1) What does Regainplay do?
http://www.geocities.com/mp3gain/ this site does a very nice job of explaining replay gain. Read the seciton on peak normalization and statistical analysis. I would try to explain it but I don't I can do it well enough. Sorry.
2) How do I make it work?
If you open up foobars preferences and navigate to playback. In about the middle is the section on replay gain. In the box you have three options: disabled, track gain, and album gain. Disabled means just that. Track gain means to use the data of that particular file as the reference regardless of the other files in the same folder with it. We are going to replay gain each song as an individual file. The album gain setting allows you to put all the songs from the same album in a folder and replay gain them but keeping the differences in db among the songs. Example - 10 songs ripped from one single album. If we track gain them to say 89db then each file will be repaly gained to 89db regardless of the other songs in the folder. It we album gain the same folder, each song will be replay gained but if some of the songs were quieter than others, they will still be quieter even though they were replay gained. try again. Album gain allows you to keep the subtle differences among the songs.
I have use peak info to scale down tracks that still clip after replaygain. A bit of insurance policy to make sure they don't clip.
I have replay gain set at the default +-0 or 89db. This is the safest. But in order for me to listen to burned cd's (mix cds) I have jacked it up to +6db. This increases the db for each song so I don't have to keep turning the volume up and down while driving. Use it with caution as todays cd's are really jacked up and it doesn't take much for them to clip.
Now close the window and goto foobars main window. Load the songs you want to replay gain. Highlight them and righ click. A little better than half way down is replaygain. Choose what you want to do and foobar will take over from there.
Sorry if I went into too much detail.