In the plastic industry, different materials (components) are used frequently to create parts with more functionality.
Components with a different material (e.g. metal) are inserted into the mold before injection molding.
This is done manually or with a robot.
It is important to hold the insert in the correct position until the plastic flows around and fixes the part.
The encapsulation allows a strong connection between insert and part, and both will be ejected as one.