A document scanner is an electronic device that captures images of physical documents and converts them into digital format. It works by using a light source and sensors to capture the image of the document and then convert it into a digital file.