To install PHP, first download the installer from the official PHP website. Then run the installer and follow the steps to install PHP on your computer. Next, add the PHP folder to your system PATH so you can run PHP commands from any terminal location. Verify the installation by opening a terminal and typing 'php -v' to see the PHP version. Finally, create a simple PHP file with an echo statement and run it using 'php filename.php' to confirm PHP runs scripts correctly. Once done, you are ready to write and run PHP code.