Like any other scanner, it consists of light source or light emitting diodes, a lens and light sensor to convert optical signal into electrical signal and then data is sent to computer for further processing.
There are 2 major classes of barcode scanners, image-based scanners and laser-based scanners. Image-based barcode scanners uses a camera embedded in barcode scanners.
Camera is used to capture the images and then processed by complex image techniques to decode the barcode.
Laser-based barcode scanners uses mirrors and lenses to read the barcode. Laser barcode scanners are similar to other scanner except that they use laser beam as the light source and employ either a reciprocating mirror or a rotating prism to scan the laser beam back and forth across the bar code.
An image-based barcode scanner do not have internal movable parts, also image-based barcode scanners have a shorter scanning distance (4 to 10 inches).
On the other hand, laser scanners are capable of scanning from longer distance (up to 24 inches) and also able to scan from a wider angle from the barcode.
Sumber : http://www.byscholar.com/103252/barcode-scanners-advantages.html