Do you have a local server installed? PHP is a server-side scripting language, so it cannot just be run like a normal HTML file.
Try watching the first few videos on the New Boston's PHP series. They show you simply how to download, install and use a local server to run your PHP on.