In an ideal world, you should remove the wallpaper before you paint the walls. This is because the seams between the sheets of wallpaper will show after it is painted, which can make the workmanship seem shoddy. Not only that, but painted wallpaper is far more difficult to remove from the walls than unpainted paper. That means that if you decide to remove it further down the road, it may be extremely challenging to get off without damaging the underlying wall. The best option is to use a steamer to remove the old paper, then clean and prep the wall before painting it. 
However, you technically can paint over wallpaper if you don't mind the seams showing and if you don't ever plan to try to remove the paper. First, though, you need to carefully inspect the wallpaper to make sure that it is not starting to peel back or come loose in any areas. If it is, you should avoid painting over it and remove it instead.
If everything looks good, you can go ahead and prep the walls. Start by putting a thin caulk line around the edges of the wallpaper where it meets the walls, floor and ceiling. This will help keep it from peeling up after it is painted. Allow the caulk to dry thoroughly before proceeding. 
If the wallpaper has an obvious texture to it, you can use joint compound to smooth it out. Just apply a thin layer over the surface, using a putty knife to gently smooth it.
Using fine-grit sandpaper, sand along the seams of the wallpaper with gentle pressure. This will help make the seams less obvious after they are painted. 
Because latex paint is water based, it can cause the adhesive that is holding the wallpaper up to soften and eventually fail. To prevent this, you should use oil-based paint on your walls. Start by priming them with an oil-based primer. Then, follow up with an oil-based paint in your chosen color. 
This video has some more helpful tips for painting over wallpaper: