A scanner works by using a light source and optical sensors to capture an image of a physical document or image. The light source illuminates the object, and the sensors detect the reflected light, which is then converted into a digital image. The scanner typically uses software to enhance the image quality and correct any distortions or errors. The resulting digital image can then be saved, printed, or shared electronically.