Ice Cream Sandwich
If you are running ICS, then it is pretty straightforward. Go to Settings > Wireless & networks. Long press on the name of the network that you need to add the proxy information to. When the popup box opens tap Modify Network and a new box will open. On the bottom left there is a check box that you need to check labeled Show advanced options. That will then reveal the Proxy settings and the IP settings options. Change the Proxy drop down from None to Manual. You will then need to scroll down a little bit and enter in your proxy information. Hit save when you are done, and then you’ll want to test it out to make sure it’s working.
On my phone it was a little bit more difficult to get to the proxy settings, and even after finding it and adding them, it still doesn’t want to work completely right. To get to the place where you enter in your proxy information go to Menu > Settings > Wireless & networks > Wi-Fi settings > Menu > Advanced > Wi-Fi proxy. On that page there is a toggle to turn the proxy on and off and also a spot to enter the host and port number. Hopefully you have some better luck than I did with getting it to work on your phone, or maybe you have a phone running ICS.