Locate the beginning and the end of the bad section on the wall. The joint compound will have a different texture than the original paint. it is important to pay attention to the edge of the joint compound. This is where you will want to finish the process.
Use the sandpaper to scrap off the joint compound that you can see. If there is a crack in the middle of the joint compound you can use the putty knife sideways to remove the joint compound from around the crack.
Sand all of the area with the joint compound on it. You will be able to tell that you have gone through the joint compound when the original paint appears below the compound. When you see this original paint stop sanding. If you have exposed the cracks that the joint compound was sealing remove them with the pointy edge of the putty knife.