In the sudden movement of cracking, a vacuum is created between the joint and muscle, and the joint fluid gets filled with nitrogen gas, such that when the bone comes back to its normal position, it pushes out the gas. This is what leads to the pop and crack sound. This entire exercise leads to some form of relief from a stiff neck.