Connect to the Pi via SSH.
Ensure that the operating system is fully current:
sudo apt update && sudo apt upgrade
Install Nginx, and then start it:
sudo apt-get install nginx sudo /etc/init.d/nginx start
To test that Nginx has been correctly installed, type the IP address of the Raspberry Pi into your browser. You should see the default Nginx page.