The anti-loosening effect of the lock nut mainly depends on the interaction force between the nut and the bolt engaging thread. There are many ways to improve the interaction force between meshing threads, such as structural improvement of nut threads, nylon roughening of nylon nuts, and surface treatment of threads.
Generally, the working principle of the lock nut is self-locking by the friction between the nut and the bolt. However, the reliability of this self-locking under dynamic load will be reduced. In some important occasions, we will take some anti-loosening measures to ensure the reliability of the nut locking. The use of a lock nut is one of the anti-loosening measures.
There are also two types of lock nuts. One is to use two identical nuts to be screwed on the same bolt, and a tightening torque is added between the two nuts to make the bolt connection reliable. The other is a special lock nut, which needs to be used together with a lock washer.