Thermal and ultrasonic inserts have external knurl patterns to ensure optimum pull-out resistance.
Devices called ultrasonic horns and heat drivers are used to apply heat as well as vibrations to the insert as it is pushed towards the hole. This melts the plastic as it goes and lets the insert sink smoothly down. The plastic then resets around the insert, securing it in place.
Thermoplastics can be altered after they have been set as melting will not cause the plastic to deform irreversibly.
This process is a speciality technique and not really for DIY purposes.