Handguns must be shipped overnight, no matter where they're going. I once had to send a gun to Nevada for warranty work and it cost me 55 smackers to get it there overnight. Long guns can be sent 3rd day delivery. Both long guns and handguns must be shipped via UPS or Fedex. The US postal service does not allow the shipment of firearms. When shipping a gun, its very important that you check it before sending it away. Shipping a gun that's loaded or a gun that's got ammunition in the same box is forbidden and can get you in some very hot water.
Some gun companies (such as Smith & Wesson) will pay for the shipping both ways. After contacting the manufacturer about warranty service work, they'll give you an account number with either Fedex of UPS, which means they'll be picking up the tab for shipping costs both there and back.
Sending a handgun overnight can be very expensive! there's a way to save money though: by taking it to your local gun dealer (who has an FFL). FFLs are allowed to send guns to other FFLs or repair facilities utilizing slower shipping. 3 day shipping to Nevada costs far less than overnight shipping. Because of this, you can save a bunch of money. Be careful though, ask upfront what the gun dealer will be charging for this service of him sending the gun out for you.
Sending a gun through the mail to your pal in another state is not allowed. If you're sending a gun to a recipient in another state, it can't go directly to the recipient. All interstate transfers of firearms (no matter what kind of gun; handgun or long gun) must be completed using an FFL as a transfer agent. That's not a big deal though, since many FFLs will accept firearms from private individuals. In recent months, the topic of transferring guns to other residents of your state has been a hotly-debated topic on forums such as vaguntrader and glocktalk.
If you are in doubt of what is legal and what is not legal to ship through the mail, consult your local ATF office or police agency.