Making a pinhole which produces an image is easy, simply make a hole in an aluminium drinks can or cooking foil with a pin.
To get the best image quality is a little harder. It is very hard to make a neat circular hole in foil and it is a bit flimsy so it would be easy to break in use. With just a needle and some fine sandpaper it is easy enough to make a nice round hole in an aluminium can but the thickness of the can causes vignetting (dark edges to the photo). This is because the can is around 0.1mm thick and the hole might be as small as 0.1 or 0.15mm so it is a bit like looking through a tunnel. There is also some unavoidable vignetting in pinhole images because the film is further from the pinhole at the edges and even a perfect hole appears smaller at an angle because it becomes an oval.
The way to make a better hole is to thin the material out around the hole. Start by making a small dent with a ballpoint pen (it might not work afterwards so use a dead one). Use a magazine or soft wood under the metal so that it dents easily.
Now sand the bump down flat with fine sandpaper (1200 grit works well).
If you sand right through like I did here, then the bump was a bit too deep. This one went on to make a 0.45mm pinhole for a test. Then gently push the end of a needle through from the unsanded side, sand down again and then neaten the hole by gently rotating the needle in the hole. Check for size and roundness with a microscope or a macro lens.
You could also buy a laser drilled pinhole which will probably be better than this or you may find pinholes for sale on a popular auction site.