A bike lock is only useful if it is installed correctly. Properly mounting the lock between your bike and a fixed object will guarantee your lock is more than a slight inconvenience for thieves. Instead, it will serve as an active security tool protecting your bike from criminals.
Wrap the main lock around the bike frame on the top tube, seat tube or down tube and affix to the object. Try to position it in such a way that allows little room to leverage it for a thief to cut or break it.
Close the lock. This will vary by lock model. For a U-lock, slide the bar onto the U-bar and lock with the key. For chain and cable locks, use the included locking mechanism or separate lock to close and lock. Make sure that the combination is not set on combo locks.
Lock the wheels and other components. Even if you have the frame locked, it can be easy to take off components including wheels and seat. Lock the wheels to the frame, using your main lock if it is long enough or a separate lock. Consider locking the seat or taking it off the bike, if you are in a high crime area.