A pinhole camera is a camera without a lens but with a tiny aperture. Light from a scene passes through the aperture and projects an inverted image on the opposite side of the box, which is known as the camera obscura effect.
1. Take an unwanted body cap for your camera and cut a rough hole in the centre
2. Tape a piece of aluminum foil over the hole.
3. Find the exact centre of your foil by drawing various diameter rules across the cap.
4. Make a very small hole in the foil. A fine sewing needle is the best tool I have found.