Open Terminal, and type:
sudo apt-get install tightvncserver
To start VNC Server, type:
tightvncserver
Set a password to access the Pi from another computer remotely after the setup.
Type the following in the terminal for creating autostart script:
cd /home/pi
cd .config
Note the '.' at the start of the folder name makes it a hidden folder that will not show up when you type 'ls'.
mkdir autostart
cd autostart
Create a new configuration by typing the following command:
nano tightvnc.desktop
Edit the contents of the file with the following text:
[Desktop Entry]
Type=Application
Name=TightVNC
Exec=vncserver :1
StartupNotify=false
Press ctrl-X and then Y, and then press Enter to save the file. On reboot, the VNC server will restart automatically.
Download VNC viewer (available for Mac, Linux, Windows, and more), and connect to ipaddress of your Pi over VNC.
Enter the credentials setup earlier and connect.
On Mac, you can also try via finder.
Select Go->Connect to Server from your finder and type
vnc://raspberrypi.local:5901
OR
vnc://IP-ADDRESS-OF-Pi:5901
Enter credentials and connect to raspberry pi.