From the September 2016 version of Raspbian, VNC Server is built-in to the Raspberry Pi, licensed for non-commercial use and ready to use.
Use raspi-config to turn it on under advanced.
ORInstalling or upgrading VNC Server manually
If you are using a version of Raspbian older than September 2016 or a different distribution entirely, you must install VNC Server manually.
On your Raspberry Pi, either download the VNC DEB package, or run the following commands sequentially:
curl -L -o VNC.tar.gz https://www.realvnc.com/download/binary/latest/debian/arm/
tar xvf VNC.tar.gz
Install VNC Server (installing VNC Viewer as well means you can remotely access computers from your Pi, if you wish):
sudo dpkg -i <VNC-Server-package-name>.deb [<VNC-Viewer-package-name>.deb]
As VNC Server on Raspberry Pi is automatically licensed, you can now run VNC Server.
Run
vncserver
to start the VNC Server
If you want the VNC Server to run automatically, do this:
sudo systemctl enable vncserver-x11-serviced.service
To undo the able, do this:
sudo systemctl stop vncserver-x11-serviced.service
These don't take affect until the pi is restarted.
Resources
Using VNC on the Raspberry Pi
Running VNCServer at Startup (doesn't work)