Move furniture out of the room, and protect the floor and remaining furniture with drop cloths or plastic sheeting.
Mask the ceiling, trim and baseboards with painter's tape. Apply it carefully to ensure straight lines, pressing it down firmly with your fingertips.
Apply the joint compound with a drywall knife. When doing more than one coat of joint compound over a repair or joint, apply the first coat with a 6-inch knife and the last coat with an 8-inch or 10-inch knife, so it blends with the surrounding surface. Allow it to dry.
Sand the joint compound with a drywall sander. For large areas, invest in a drywall pole sander to make the job go much faster, with less stress on your shoulders and arms.
Prime the joint compound and any bare drywall. The Paint Quality Institute suggests PVA drywall primer, but any general-purpose interior latex primer will work. For soiled walls and the best adhesion, use a shellac- or oil-based primer.
Brush a "cut in" line around the trim and along the ceiling with your wall paint. Use a 2-inch or 3-inch brush.
Roll the walls, starting at the top and working down toward the baseboard. Allow the paint to dry on the wall for at least two hours, and then apply a second coat, starting with the cut-in and finishing with the rolling. Two coats is enough unless you're using a very bright color, such as red or bright yellow.
Remove the painter's tape when the paint has dried for at least two hours. This will give you perfectly straight lines.