Take up the old top flooring with a hammer and pry bar. The method of removing the floor will vary, depending on what type of flooring it is, but all types will have an underlayment of plywood or cement board. Strip the top flooring down to the underlayment.
Go over the surface with a razor scraper to remove any residual glue, mortar or other material from the previous floor, getting it flat and smooth. Sweep thoroughly.
Lay a 4-foot-long 2-inch by 4-inch board on the floor on its narrow edge at one end of the room. Move it slowly across the surface, watching the spot where the board sits on the floor. Wherever there is a space between the board and the floor, indicating a dip in the floor, mark a circle around the low area with a pencil. Mark up the whole floor as needed.
Combine powdered floor-leveling compound in a bucket with water according to the manufacturer's instructions. Mix it with a drill and mixing bit. The mix should be thin and watery.
Pour the leveler slowly over the low areas marked that you marked in Step 3, letting it spread out over the floor. Start at the side of the room opposite the doorway and work your way out of the room.
Let the leveler set for 24 hours. Install vinyl, ceramic or wood flooring directly over the newly leveled underlayment.