Use a paint scraper to remove all loose paint and other material from the wall.
Dig out around any deep cracks or holes with a small drywall knife, removing all loose plaster. Patch those areas by spreading on some joint compound, pressing drywall tape over the wet compound and then spreading more compound over the tape. Get it smooth and flat. Let it dry for four hours.
Spread a very thin layer of joint compound over the whole wall with a wide drywall knife, starting at one edge and working across. Drag the knife over the surface at a shallow angle so you can see through the compound on the flat areas as the compound fills in the holes, cracks and depressions.
Let the joint compound set for four hours. Scrape it with the knife to take off any ridges.
Spread on a second coat of joint compound in the same way as the first, again keeping it very thin.
Let the second coat dry. Scrape it flat. Apply a third coat of joint compound.
Let the third layer dry overnight. Sand it lightly, making sure it's completely flat. Prime and paint the wall.