Bicycle locks come in a variety of styles. There are cable locks, chain locks, U-locks, D-locks and wheel locks.
Cable locks and chain locks are amongst the most convenient due to their length which means that a bike can be locked to a variety of different fixed objects. They can be bought with combination or key mechanisms.
U-locks and D-locks are the most secure locks because they are smaller and generally use thick metal which gives them great structural integrity and means they are very difficult to cut or open without the correct key. These locks are generally just key locks.
Wheel locks, rarely used, are a low security mechanism mounted on the frame that immobilises the rear wheel by moving a steel bolt through the spokes to prevent motion. A wheel lock prevents riding the bicycle but does not secure the bicycle to a stationary object.