1.The light from the candle travels straight in all directions from each point of the flame of the candle.
2.But only the light coming in some particular direction can enter into the camera.
3.Light which comes from the point at the bottom of the flame goes straight towards the top of the screen.
4.In this way the light coming in a particular direction from each point of the flame,will be able to enter into the pinhole and light going in other direction is blocked by the black sheet.
5.This lead to the formation of inverted image on the screen.