Removing wallpaper can be a messy process, and you might end up with some bits of paper and paste residue on the wall after the bulk of the job is done. This is especially true if you are removing older wallpaper that was put up with old-fashioned wallpaper paste. (Newer wallpaper is strippable, which means it's designed to come off easily.) It is important to remove all of this stubborn residue, or it will show through the paint you apply. It may take a little time, but persevere now to prevent problems later.
Mix up a solution of 1/4 cup TSP (trisodium phosphate) and a gallon of warm water in a bucket. TSP is available at hardware stores. It is an inexpensive, heavy-duty detergent used to prepare walls for painting and is mildly corrosive. Use rubber gloves and protective eyewear when working with TSP, and protect the floor and surrounding woodwork with plastic tarps kept in place with painters' tape. A less caustic solution can be made from 4 tbsp baking soda in a gallon of warm water.
Wash the wall with the cleaning solution using a rag or sponge. Allow the glue residue to dissolve, and then wipe the wall down again. While the wall is wet, use a scraper to remove any bits of paper that have become loosened. Work at extra-stubborn bits with a utility knife, being careful not to dig into the wallboard of the wall itself.
Allow the wall to dry overnight. Use 120-grit sandpaper to sand away any last bits of paper and paste still left on the wall. Then give the entire wall a light sanding to be sure the surface is as smooth as possible.
Paint the wall with a high-hiding primer, which will hide small imperfections and help the paint adhere better, before you apply the colour coat.
If a significant amount of residue is still remaining after you have washed and sanded the wall, rent a steamer to remove it. If there are paper and reside spots that simply won't come off, blend them into the wall by spreading joint compound with a trowel over then and then sand the spot after the joint compound dries. Joint compound is a readily-available, inexpensive, water-soluble plaster used to cover drywall and prepare it for painting.
Don't let your enthusiasm for removing the wallpaper result in scraping away the paper surface of the wallboard, or you will have the extra task of repairing the wall.