The lens-release button on a single lens reflex (SLR) camera is a structural component in the camera body itself. The button is responsible for releasing the lens from the body to facilitate removal. All SLR cameras regardless of the make or model are equipped with a lens-release button.
The lens-release button is usually located on the front left-hand side of the camera body (from photographer's perspective) right next to the lens mount. It is generally either black or white depending on the camera model and make and has the singular purpose of releasing the lens from the camera body. When the button is pressed, the lens is released and can be removed by twisting out of place. The purpose of removing a lens is either to change to an alternate lens or to clean the lens or camera body elements.
The lens mount is the metal ring attached to the front of the camera body that the lens "snaps" or slides into. The ring contains a specific pattern of grooves; therefore, in order to attach the lens, it has to be lined up at the right position in order to slide into the grooves. On digital single-lens reflex cameras (DSLRs) the lens mount contains an electronic connector that transfers the information on the lens to the camera for the photographer to view. When the lens-release button is pressed, a small locking element in the lens mount retracts, allowing it to come free.
The first SLR cameras featuring a one-button, one-twist lens release (and lens attachment) appeared in 1977. Prior to 1977, removing and attaching a lens to a camera body was a bit more complicated. To properly attach the lens, the exterior aperture prong would have to be rotated to fit the greatest aperture setting and then adjusted to the lowest. All post-1977 cameras are more user friendly with fast removal and fast attachment lens mounts.
Most camera brands (such as Nikon and Cannon) build all of their lenses to be compatible with any model camera body. Meaning, it is possible for a 1968 Nikon camera lens to fit the body of a newer Nikon DSLR body and work. The lens release button in this case would function the same way as with a modern lens.
Reattaching the Lens
After the lens is released, in order to reattach it you must line up the small red or white dots visible on both the lens mount and the lens itself in order to properly connect it. Once the dots are lined up, the lens is gently pushed inward and twisted to the right (photographer's right) until it is secured by an audible "click."