Two different types of viewfinders appear in a digital camera.
An optical viewfinder is an actual window that attempts to match the path of the main lens. Some high-end digital cameras link the optical viewfinder to the lens, meaning the viewfinder looks through the lens, using a series of mirrors and prisms.
An electronic viewfinder, or EVF, is a tiny LCD that displays the image that will be taken. EVFs can display information about the camera's settings, but they can be tough to see in low light.