In a pinhole type viewer the light enters through the small hole, which like its namesake can be created by using a pin. The light then creates an image on another surface such as a wall or paper. This is similar to how light enters the eye through the pupil. The light coming through our pupils then creates an image on the retina of our eye. Unlike our brain that compensates for this, the image from the pinhole will appear upside down on your wall or paper.
In this picture, I found an idea online to use multiple pinholes to create 2017 out of mini eclipse images! A fun idea if you don't have safe solar viewing glasss.