The lines look very defined. How might the mask / template been made?
The mask could have been cut from a purpose-made masking material as used by airbrush artists, called frisket. But any self-adhesive plastic film can be used similarly. Adhesive vinyl is often used for this sort of thing today.
The advantage of frisket is that it is extremely thin and as a result it is very easy to cut directly on the surface to be sprayed, with almost no pressure. Any very sharp knife can be used, e.g. craft knife, scalpel or even a boxcutter.
Homemade versions
If any manufactured self-adhesive plastic cannot be found locally, or the cost is prohibitive, an equivalent is simply made. Start with acetate sheets (as used in overhead projectors) and coat one side with spray adhesive. Spray, wait a short while until the glue has become tacky, then press down well; the back of a spoon or a hard rubber roller (brayer) will help here.
Something similar can also be done using common hairspray and thin tracing paper or baking parchment, but here you spray and immediately press the paper onto the surface. Obviously this will not cut as cleanly as plastic but with a very sharp knife good results are still possible.
Some adhesive residue may remain with either of the above techniques. The ideal solvent for commercial spray glue is usually mineral spirits/white spirit, and for hairspray it is alcohol. In these cases it may be best to use stains that don't react with the relevant solvent, so oil-based stain if using alcohol and waterbase or alcohol-based stains if using spirits.
"Cheating"
Many commercial vinyl printing operations will be able to cut a mask for you! They can use various electronic file types, e.g. Illustrator files, to guide their plotters.
I would have expected the paint to bleed or something.
Obviously the mask being adhered to the surface will largely prevent this.
But when adhesive film is not used careful spraying can nearly eliminate the problem. The main techniques are:
- spray lightly
- spray at 90° to the surface
If you spray very lightly the paint/stain particles don't form a wet film on the surface, which makes bleeding under an edge much less likely.
As much as possible you should spray perpendicular to the surface, any spray at an angle will tend to lift the edges will obviously lead to underspray.
Where a coloured finish is being used and not a conventional stain/dye another trick is to pre-seal the mask by spraying a thin coat of clear finish first. After this no bleeding is possible (in theory at least) and it does have one other issue, it tends to create a slight lip around the edges of the coloured areas once the mask is removed.
The colour of the inlay looks non uniform. Is that just some creative sanding or is something more sinister at work?
Hard to tell. It could have been a whim of the creator or just accidental.