All DSLR cameras and point and shoot cameras have sensors which consist of pixels with photodiodes. These convert the energy of photons into an electrical charge. That charge is converted to a voltage, which is then amplified to a level at which it can be processed further by the digital camera's Analog to Digital Converter (called the ADC, AD Converter, and the A/D Converer for short).
The job of the ADC, which is a chip inside your digital camera, is to classify the voltages of the pixels into levels of brightness and to assign each level to a binary number, consisting of zeros and ones. Most consumer digital cameras use at least an 8-bit ADC, which allows for up to 256 values for the brightness of a single pixel.
The minimum bit rate of the ADC is determined by the dynamic range of the sensor. A large dynamic range will need at least a 10-bit ADC to produce a large number of tones, and to avoid any loss of information.
However, camera manufacturers usually over-specify the ADC (such as with 12 bits instead of 10 bits) so as to allow for any errors on it. Extra "bits" can also help to prevent banding (posterization) when applying tonal curves to data. However, they won't generate any additional tonal information, apart from noise.