Here’s how to etch a solderpaste stencil. The process is similar to the UV photo etching method used for DIY PCBs.
This is all well and good, but commercial stencils are expensive, and are massive overkill for prototype boards. Here is a method for producing a “good-enough” stencil using aluminium sheet via a method similar to PCB production via the UV photosensitive film method.
He also provides a guide on how to use the solderpaste stencil to apply a soldermask to your PCB.
Just use the stencil to put down a thin layer of petroleum jelly instead of solder paste, then apply spray circuit lacquer to the board. Once dry, wash the petroleum jelly off with methylated spirit. You will be left with the board protected by the lacquer, except where the solder paste is to go. This will help prevent the paste from flowing down the tracks of the copper board (effectively, a solder mask)