When it comes to sanding drywall, use even pressure, and gently push and pull the sanding block over the mud. Toward the edges, you want to feather the mud, so it softly fades into the drywall. This means you won’t end up with harsh, obvious ridges once you paint. To do this, use a circular, buffing motion. Don’t put too much pressure on the block, or you can damage the surface paper of the drywall. (If this happens, you’ll need to cover the damage with mud, as paint will lift the paper and make the damage visible.)
As you sand, you may encounter the odd screw or nail protruding. Scratch the mud from the slot and screw it in further. If it isn’t grabbing wood, remove it and fill the hole.
Once you get near inside corners or outlet boxes, it’s best to not use a block, hand sander or pole sander, because it’s easy to slip, putting a gouge in the adjacent wall or mud. Or you can sand too far, gouging the inside corner. You might want to leave these more finicky areas till the end, then simply use a piece of sandpaper (no block) to deal with them. An angled sanding sponge is good for inside corners.
Finally, choose a good primer, which will hide any remaining texture difference between the drywall mud and the surface of the drywall. Remove big clumps of dust from the wall, but not all. Some experts recommend leaving an even coating of dust on the walls, suggesting that as you paint, the dust mixes with the paint and fills in flaws such as scratches.