A bicycle lock is a physical security device used on a bicycle to prevent theft. It is generally used to fasten the bicycle to a bicycle stand or other immovable object.
A difficulty in preventing the theft of a bicycle is that the wheels are easily detached from the frame, and that unless both wheels and frame are secured, the parts not locked can easily be carried away. The most secure locking method therefore is to lock the wheels and frame to each other and to an immovable object. This is best achieved by using a chain or cable lock.
Cable locks and chain locks are similar. Cable locks often come with the locking mechanism already permanently integrated. Otherwise, a length of cable with loops on both ends can also be used.
The main advantage of cable locks over chains is the ease of transporting them. Many cable locks are made of spring cable that automatically coils itself when released. Even a straight cable can be coiled by the user into a more manageable shape than a chain.