There are 4 main types of locksets used. The choice of a lockset depends on use and aesthetic preference.
Cylinder locksets are most common in residential applications, but they are also used in institutional and office spaces. A hole is bored into the face of the door and a second hole is bored through the door edge and into the first hole. The main lock cylinder shaft is installed into the larger hole. After, the smaller latch cylinder is installed into the edge hole.
Mortise locksets are generally used in institutional and commercial applications. The lock unit is installed in a mortise cut into the edge of the door. The handle and lock are then installed.
Unit locksets are not regularly used. A rectangular notch is cut into the door and the single-piece unit lock is installed into the opening then tightened.
Rim locksets are used when modification of the door is not possible. The rim lock is face mounted to the door and a strike is face mounted to the door frame. These locksets are only accessible from one side of the door; i.e. there is not a handle or lever on the outside of the door. Pictured above is a rim lock with key access. In many applications, a thumb-turn is used instead of a key.