If you want rear axles, see my other project: http://www.instructables.com/id/Rebuild-a-bicycle-rear-hub/
A future instructable project is coming concerning frame alignment. Please see it first if applicable!
Have at least 3 separate rags for this procedure. Rag 1 is for the raw glop of removal, rag 2 is for finer cleaning after rag 1, and rag 3 is for reassembly.
Have some non-chlorinated brake cleaner aerosol, and a glass jar to catch the overspray for best results. The overspray will still be useful to you in the future.
For front axles as covered here, the situation is essentially the same. Best method is as described below:
If you do not have a cone wrench (a recommended tool), try to determine the side that will give way first by unscrewing the locknuts away from each other. The side that moves relative to the axle is your first bet, then retighten the "stubborn" side to the fork as tight as possible, once this procedure allows. Then loosen and remove the nut from only one side of the front axle from the fork, and then loosen the cone locknut. Sometimes the cone locknut will stubbornly hang onto the cone. loosen it enough to get any form of wrench or pliers onto it to break the two free from each other in as few turns as possible. Since you are repacking the hub, use of penetrating oil such as "PB Blaster" is recommended, even if the parts are not rusted/seized.
Once you have them free from each other, spin them off completely and put them on rag #1. Scour off as much old sludge as possible with this rag from the cone and locknut first, then from the axle and other cone/locknut on the other side. Perfection is not required yet, just get the main glob of goo off.