Tor is an anonomizing proxy, see their list of usage scenarios if you want more details. A basic Tor client is extremely easy to set up on Gentoo, just emerge net-misc/tor, possibly tweak the stock /etc/tor/torrc, and fire up the connection with

$ sudo /etc/init/tor start

which (by default) opens a SOCKS

To use your new Tor "proxy" with Firefox, go to Edit->Preferences->Advanced->Network->Connection->Settings->Manual proxy configuration and set

SOCKS host: localhost
Port: 9050
Version: SOCKSv5

To use remote DNS, enter about:config in the address bar, set the filter to dns, and set network.proxy.socks_remote_dns to true by double clicking.

To disable cookies, which would allow the sites you're connecting to to track you as your exit IP changes, go to Edit->Preferences->Privacy, select Firefox will: Use custom settings for history, and make sure Accept cookies from sites is unchecked.

To check that everything is properly configured, you can browse over to Tor's check utility.