Install a web server and PHP. One of the most popular web servers is Apache.
For Windows, there's a package called XAMPP that includes Apache, MySQL, PHP, and some other minor things, and it's fairly easy to set up.
For Mac OS X, there's also MAMP.
For Linux, you can usually use your package manager. For example, if you're using Ubuntu (or probably Debian as well):
sudo apt-get install apache2
sudo apt-get install php5
sudo apt-get install mysql-server
sudo apt-get install php5-mysql
sudo apt-get install libapache2-mod-php5
sudo apache2ctl restart