Check the basics first. Allow the lock to thaw out if the weather outside is cold enough to freeze the tumblers in place. Gentle heat from a hair dryer speeds up this process. Be certain you are using the correct key; it's easy to use the wrong one if you have several keys that look the same.
Spray a little graphite powder into the keyhole and work the product in by inserting and removing the key. Graphite powder, which you can purchase at a hardware store, is commonly used by watchmakers and locksmiths to lubricate and free up jammed parts. Unlike moisture dispersing sprays and oils, graphite powder does not attract dirt. The key should easily enter the lock and turn when there is proper lubrication.
Lock the door while it is open and check that the bolt lines up with the hole in the strike plate on the door frame or opposite. Unscrew the strike plate and raise or lower it slightly so the bolt enters correctly. You might find you have to put pressure on the door to make it lock if the strike plate is out of alignment.