Pound the nail heads back into the drywall using a hammer and a nailset. A nailset is a rod of steel slightly larger in diameter than a pencil. One end is pointed and the other end is flat. You put the pointed end on a nailhead and tap the flat end of the nailset with a hammer. The point drives the head of the nail below the surface of the drywall. This result is a slight depression into which to put the joint compound.
Tap the area with a hammer head to further slightly dent the area, creating a dimple. Use a very gentle, light pressure so you don't dent the core of the drywall.
Cut away any torn paper from the surface of the drywall with a razor utility knife, to further clean up the area.
Scoop up a blob of joint compound with a putty knife. Apply it to the dimpled area in two swipes, forming an “X” with the putty knife to apply the joint compound.
Scrape off the excess joint compound with the edge of the putty knife, leaving the surface of the patched area flush with the surrounding drywall. Remove any joint compound from the surface of the surrounding drywall. Allow the joint compound to dry, following the manufacturer's recommendations.
Apply a second coat of joint compound in the manner as the first coat after the first coat is completely dry. Let the second coat dry.
Sand the surface lightly with drywall sand paper until it is flat and blends in the surrounding area.
Apply one coat of primer to the patch, using a paint roller. This will help raise the surface texture of the patch to match that of the rest of the wall.
Paint the area to match the existing wall color.