PHP is a server-side scripting language that allows a website to be produced dynamically, i.e. in response to user input, or data held in a database, etc. The PHP program basically determines the HTML code that is output.
PHP works great in conjunction with a MySql database for producing a data driven website that can produce customised content dependant on the data is is given or provided by users.