The easiest way to access files on a Mac from outside your home, is to use Back-to-My-Mac
You enable this via System Preferences -> iCloud -> Back to My Mac
and you access the enabled Mac from another Mac, where both Macs are using the same Apple ID.
This is a very secure way to connect 2 Macs remotely. All connections are encrypted, and secured.
But if you want to go around opening ports, then AFP is port 548
You have to configure you home router to port forward TCP/IP port 548 from the internet side of the router to your specific Mac inside your home.
You then have to get the router's internet side IP address (subject to change at the whim of your ISP, although most ISPs only change the IP address when your router is disconnected, there is an ISP network interruption, the router is power cycled, or due to a power failure.
You of course have to enable System Preferences -> Sharing -> File Sharing and make sure via "Options" on that page that AFP is enabled.
From the Mac outside your home you would use Finder -> Go -> Connect to server -> afp://ip.addr.of.router
NOTE: This is not necessarily a secure connection. Your AFP port is a known port and subject to script kiddies attempting to break into your system, so I strongly suggest you have a very secure account password. Also when you are connected, your AFP traffic is NOT encrypted (which it would be for Back-to-My-Mac).