Before you lay any type of flooring, the subfloor should be flat, and when it is plywood, 1 approach to flatten it is to sand it. That is best done using a flooring sander. If you need to remove adhesive from old carpet or shingles, use a floor buffer first.
Flattening the Floor
Prior to installing laminate or hardwood planks, the subfloor should be flattened to a tolerance of 1/4 inch in 10 feet. Going over the floor using a drum sander is the quickest way to try it, and as you do not have to be worried about scratches, you can use tough paper and do the job fast. Before you sand, do not forget to set all the screws and nails and fill depressions and gaps using floor leveling compound.
Adhesives and heavy paint often gum up the paper onto a drum sander, so it is best to remove these using a floor buffer. You can find quite a few of buffer attachments that will do the job fast, including scrapers and specialty adhesive removers. After a treatment using a buffer, a thorough vacuuming and a pass with a drum sander should find the subfloor prepared for a floor covering.