Connecting from another Mac. This is the simplest. Other mac on your network will appear in the finder sidebar, and you are two clicks and a password away from controlling it.
If you want to do this from outside your network, you need to setup port forwarding on your router. The port in question is tcp port 5900. If you don’t feel good about opening this to the internet, good for you. You still have options, you could use ssh tunneling or a VPN. VPN is probably the easiest, and is supported by some routers out of the box. If you're only planning to connect from other Macs, you can enable Back to my Mac in iCloud and in theory, this Mac will then show up in the side bar of any Mac you're using when signed into your iCloud account. I've had mixed success with this, but using the method below works 100% of the time, and from non-Mac computers.
To connect to a remote Mac that doesn’t just show up in the side bar, you can use the menu option Go / Connect to Server... in the Finder. The address you enter should be in the format vnc://external IP address. If your port forwarding put you on a different port than 5900, specify the new one with the :12345 syntax. You'll probably want to setup a DDNS service to make your computer accessible from anywhere. That's beyond the scope of this article, but check out your router's configuration and look for DDNS to see which service(s) it supports. There are lots out there.
You’ll notice that the screen display is quite good, and updates pretty quickly. If you've used VNC on other platforms this might come as a surprise. It's usually fast or nice looking,but not both. Apple has added some proprietary extensions that adapt to speed, and progressively send more detail do that the screen updates quickly, and static screens look perfect.
There is a downside though. These extensions are not well supported by third party VNC clients. No big deal if you exclusively connect from other Macs, but from a PC or iOS device, you need a third party client, as Apple doesn't provide one. Most VNC clients work with a Mac, but only at full fidelity, resulting in a sluggish display over all but the fastest networks.
I've found one welcome exception to this though.
Connecting from a PC or iOS Device. The Remotix client, available for iOS and Windows actually supports Apple's proprietary extensions and works just as well as connecting from a Mac.
You can find out about the iOS version here: https://www.nulana.com/remotix-ios/
You can find out about the Windows version here: https://www.nulana.com/remotix-windows/
They also make a Mac version, although, I don't know why you'd want it for this purpose, as you can already connect natively from a Mac.
As far as I know, there are no Linux or Android clients that work nicely with Apple's proprietary VNC extensions. You can get by with any VNC client, but the performance will be atrocious. If you've found one, please leave a comment below, I'd love to know about it.