You screen print solder paste through the stencil, onto the board.
You then push the components onto the paste.
In the past you didn't have to be too precise, because surface tension of the solder as it flowed would pull it onto its pad, and would align the component correctly.
These repair stencils are also used for reballing BGA components.
A brand new BGA chip has hundreds of solder balls underneath, acting like the pins on a DIP package. When the component is reworked, the balls are damaged and need to be replaced. After removing the old balls, the stencil can be used to apply solder paste and new solder balls to the chip. Once the chip is reballed, it can be reflowed onto the board.
In reality I would expect all these components to be squeezed tightly together so I don't see how the large stencil plate would be of much use for rework. Presumably it would need to be cut up into small "per IC" units if someone wanted to put down solder paste on to a PCB which was already populated with other ICs.
You screen print solder paste through the stencil, onto the board.
You then push the components onto the paste.
In the past you didn't have to be too precise, because surface tension of the solder as it flowed would pull it onto its pad, and would align the component correctly.
For production you'd have camera aligned tables.
Re rework you have little tiny masks.
Here's a bit of video: https://www.youtube.com/watch?v=LaqeLrLxYOg (Screen printing starts at about 1:40)
I used to operate a screen printer, pick and place machine, and reflow oven. But that was 12 years ago. The machines are amazing now.