remote access

I was unable to remote desktop into my computer from another computer on my hone
network -- I turned of the firewall on that computer an then was able to connect
-- what setting controls this ?