It costs 20-30 bucks worth of parts depending on if you already own some of the tools. The two that I've fixed have been problem free ever since they were fixed. That's my launch xbox which has been fixed for 3 years, and a friends xbox that's been fixed for about 2 years. In contrast, most of the people I know that have sent theirs in to MS for repair have had to send in their xbox again at least one more time, with most sending it at least once a year. People don't seem to think it's a big deal, but being without your xbox for a month isn't that great a bargain to me. Fixing it once on your own feels like a better solution.
The repair involves re-mounting the motherboard to the case so that motherboard is no longer bowed in the middle. You also have to remove the heat sinks and clean off the thermal paste, drill holes in the motherboard tray, then remount the heat sinks fastening them to the tray rather than directly to the motherboard.
I think the parts are something along the lines of 8 bolts, 8 nuts, thermal paste, roughly 60-70 washers, electrical tape, and a napkin or foam if you have it. The tools you'll need are a drill that can drill metal, tin snips or a hacksaw, sand paper, an old credit card or similar plastic material, scissors/razor blade, and a screw driver.
Here's a video of the method I used.
http://www.youtube.com/watch?v=j3qAO7Eqbdg
If you've ever build your own computer and have ever handled a drill, then it's actually not that difficult. The last fix I did only took 2 hours. $40 is a bit much for a broken system though, I wouldn't pay more than 20 for one.