Yes, PHP needs to run on a server, either as a CGI or a module, so the server can interpret the scripts.
If you're using a Unix or Windows, you can setup Apache on your system so you can test run your scripts on your computer before uploading them to your web host. This is what I do, and it is VERY useful and convienent.
Not sure about options for Macs, but I know they exist.
<:3)~~
http://www.gerbilbox.com/newzilla/