I've changed one on a 3G so I assume that'll be the same as a 3GS, i just brought a new battery from eBay.
Fairly straight forward but you do have to basically dismantle the whole phone to get at the battery and there are some delicate connectors in there, if you're not confident with it i'd...