Beyond what has been posted above, I prefer to give the gun a quick clean and lube, which hopefully keeps it from suffering too much if t gets left out in the rain or something, and to make sure it has all the screws and springs it needs, throw a zip tie through the action or over the trigger, then I bubble wrap the gun like there's no tomorrow if I don't have a hard case going with it. If the gun has protrusions like a prominent trigger guard, or a scope, or something that might be the first thing to suffer an impact I will try to build up around it to disperse any potential impacts.
I work in the shipping industry, I know what goes on in the warehouse...also, if I am sending separate components like scope rings or magazines I will bubblewrap those separately and then attach them to the bubblewrap on the gun.
Then I'll make a frankenbox sized appropriately to ensure that the gun will not slide around or build enough momentum for the barrel to stab through the box.
Then I tape everything shut and secure and I prefer to put some wrapping paper on there to make it look a bit more noticable. Easier to keep track of a bright white package than some beat up old cardboard. Then I label it and put about four dollars worth of tape overtop of the wrapping paper. That keep the writing from getting smudged, keeps the paper from ripping open, and hopefully provides some protection from any rain or moisture.
If I ever get really fancy guns I'd probably make little crates for them and put some zerust on there, but for cheap guns I haven't had any complaints for how I wrap things. Well one guy did say it took him like half an hour to get all the wrapping off.