Is sanding hardwood floors really necessary?
Wall to wall carpeting is usually attached to the floor using carpet tack strips around the perimeter like these



The raised tack points grip the edges of the carpet.

Once you pull up the carpet,  there is probably a padding that is just laid on the floor without adhesive. If it is rubber backed, the rubber bottom surface sometimes sticks to the floor underneath. Rubber residue can usually be scraped of with a plastic putty knife without damaging the surface of the wood underneath.

The tack strip can be pried up and there will be a few nail holes per strip that can be easily filled.

The real issue will be the condition of the finish on the floor once you get to it. If there is glue on the surface, this may be difficult to remove without serious sanding.  Often the finish is fine and a cleaning is all that is needed.

If the finish is slightly worn or lightly scratched, a light sanding followed by a coat or two of polyurethane should restore it. Professional finishers have a light abrading process using large buffing machines that can do this easily and quickly. However it can be done with an orbital sander and lots of time and elbow grease. Very thorough vacuuming and wiping of all dust is essential for a good finish.

If the finish is badly worn or deeply scratched, a serious sanding and refinishing is called for. Again, it can be done by the DIYer, but this is a big job, sanding with power hand tools is very tedious and the professional sanding machines are difficult to use for the novice.