First off, any gun sent interstate needs to be sent to a local FFL holder to be transfered to you. You will need to fill out a form 4473, pay a transfer fee, plus anything else your state laws require. Transfer fees are usually $20-$30 or so, but can be higher in some locations.
Now, for the actual mailing, long guns (shotguns and rifles) can be sent through USPS. Handguns cannot, they must be sent UPS or FedEx and the rules from these companies require it to be sent overnight, which is not cheap. It's usually cheaper for the sender to find an FFL holder who's willing to ship for a fee it as they're able to use USPS ground.