OSX does come with a firewall. I believe it is turned off by default, but it is easy enough to check:
https://support.apple.com/kb/PH14267?locale=en_USFor JRemote to be able to connect, the computer will need to allow connections on the port configured in MC under
Tools > Options > Media Network > Advanced > TCP Port.
If the firewall is off, this will work by default from any device on the same LAN as the computer (including WiFi). If the firewall is on, you'll need to set it to allow MC, and perhaps open the port described above.
If you are trying to access your computer from outside the LAN (to stream music to your device or to connect using a cellular data connection, for example) then you will need to forward this port through your Router. The instructions for this are specific to your particular router, and we're not really equipped to give you detailed instructions here, but if you search for your router make and model and "port forwarding" on Google, you can probably find some good instructions.