As yomomma says, for optimum results, have it professionally done. I've done both and a DIY job won't hold a candle to what a guy with the right equipment will do. If you don't want to spend the money on that and you want to do it yourself, do some reading on the subject. Prep is everything. Clean and finish the surface, to what you want the gun to look like - bluing won't hide anything.
My last gun I did some DIY bluing on, I used Birchwood Casey Super Blue, but I have heard that guys who used the Oxpho-Blue have gotten decent results too.
To simonsez - IMHO, it's more cosmetic than rust resistant - as all bluing is. Handle either with sweaty hands, or get it wet and don't wipe it down with an oily rag afterwards, and rust will start to form on both - and it doesn't take long. For better rust protection, Parkerizing, or some of the newer finishes definitely work better.