php.net has pretty thourough instructions on how to install php with almost any os and server software. gd wont require you to do very much on windows, basically make sure the dll is in the right place and uncomment it from your php.ini file (instructions online too). as for a mailserver, if you are running windows nt/2k/2k3 you should be able to turn the local smtp server on and use it with your php.ini settings, otherwise you might as well just enter in your isp's smtp server since they will allow you to relay.
www.php.net/install is a good place to start.