Light rays from each point on the source object pass through the small pinhole and create an inverted image on the projection surface. The smaller the pinhole, the sharper the image but dimmer it becomes. The rays show how light travels in straight lines and creates the characteristic upside-down and left-right flipped image of a pinhole camera.