Locks. Silicone spray is best. Spray it in the openings and key holes and move the movable parts.
Car doors. Take a bit of white grease and rub it over the hinges. Open and close the door a few times, and wipe off excess globs.
House doors. Hinges are a common culprit. If the hinge has a removable pin, it’s best to remove it and lubricate that way. Shut the door and have someone handy to keep the hinge side in place, and you won’t have to remove the door. Pop the pin, spray in silicone spray through the entire contact area. If the pin isn’t removable, simply spray, working the door back and forth.
Grease is messier, but lasts longer. Pop the pin, apply a thin coating of grease with your fingers. Put the hinge back in, open and close the door a few times, and rub off any excess.
Doors can also stick because the hinge screws are coming loose, or the wood is rubbing against the jamb. Check to make sure all screws are tight. If a hole has been “de-threaded”, stick a match (headless) or piece of solder in the hole and screw the screw back in. If the door is rubbing here and there, find the high spots, then use a belt-sander to take them down just a bit.
Stuck window sashes. First, analyze why it’s stuck. If a wooden sash is painted shut, you can cut the paint along the joints. If it’s really stuck, you may need to remove the stops holding the sash in place. Don’t use a prybar to try and lift the window, as you’ll damage the sill. Once the window’s moving, rub candle wax along the channel the sash slides in. Or spray with silicone spray.