Before you start sanding or planing, be aware that you will be producing an awful lot of dust, depending on the floor area size so it is probably best to seal the area to contain the dust from nearby areas. You will need to protect yourself and suitable face mask and protective glasses should be worn along with protective clothing that will end up getting very dusty.
After you have exposed the floor from any old carpets of floor coverings, inspect the floor and repair any loose boards or damaged areas. Check across the floor for floorboard nails and make sure they are all seated well into the wood. A stray nail may damage a plane blade or destroy a sanding belt if not seated below the surface of the floor. So it is well worth taking a bit of care on the preparation to avoid disasters later.
Excessively worn or dented floors may require several sweeps of a floor planer to smooth them out. Don’t try to take off too much wood on each sweep. After planning the entire floor, check again for any nails that may have come loose or are protruding before continuing.
You may be wondering why it is necessary to use a belt sander or floor planer if you have a relatively small floor to renovate that appears fairly flat and smooth already. Well, you can try using a standard woodworking hand scanner but it is very likely the job will turn out to be much longer than you had first imagined, or the sander might not be robust enough to cut deep enough into the wood to remove all that ugly wear and tear you want to get rid of. A belt floor sander is much more robust and can be operated whilst standing as opposed to small handheld sanders.
The final sweep of the floor is probably best done using a belt-type floor sander to produce the best finish prior to varnishing.