Move out what you can and cover the floor and anything that has to stay. Fill nail holes and cracks with spackle, sand them smooth and wipe the walls down so the paint has a clean surface to grip. Put the tape on once the walls are fully dry.

If you see flaking paint, stains or a damp patch, fix the cause first. Painting over a leak only hides it for a little while. A coat of primer over patched spots and stains helps the new paint dry to an even finish.