Remove the trim strips around the door frame. Use the putty knife to loosen molding or trim strips around the frame of the door. These are the pieces of wood that are parallel to the door and frame the top and sides of the door. Carefully pry the molding up, to avoid spliting or cracking the molding. Once the molding is removed, pull the finishing nails out of the wall frame with a claw hammer. You may have to remove the molding on both sides of the door. If you pull the trim carefully, you may not have to re-paint after you fix the door frame.
Evaluate the warp. If the door is rubbing on the frame, hammer the door frame tighter to the wall framing with a rubber mallet. If there are shims between the door frame and wall frame, remove them or pull them out slightly so the door frame can be tightened against the wall frame. Open and close the door frequently while adjust to get a perfectly square door frame.
Plane the frame. If the door frame is already tight against the wall frame and you need more room, use a plane to take wood evenly off the frame where the door is rubbing. Take fine shavings and evaluate repeatedly until the frame is square. Take a little extra off to account for the thickness of a new coat of paint.
Shim the frame. Use wedge-shape shims to make the frame tighter. Gently tap shims in from either side of the frame to correct warping. Shims should hold by themselves. Use a handsaw to trim the portion of the shim that extends past the wall before replacing molding.
Replace the molding. Use finishing nails to fasten the frame molding and trim with a plane if the molding extends beyond the new border of the frame. Use a nail set to make the finishing nails flush with the trim.
Spackle gaps and nail holes. Use the putty knife and spackle to fill any gaps, crevices or holes. Allow to dry and repaint if necessary.