In these days of political and other disturbances, it is necessary for each and every country to be prepared with lots of modern arms to prevent any kind of causality and external attacks. Till date, some great firearms are invented in war point of view. Of them, a special firearm called AR 15 is popular and handy to use, till date.
Let me tell you about the mechanism of the AR 15 automated and magazine fed rifle. The type of mechanism operation for the AR 15 rifle is called the 'direct gas impingement' mechanism. An amount of gas uses to be tapped from the barrel of the rifle and as the result bullet moves past the gas port, which is located under the rifle's front-sight base. The gas uses to rush into a port and down the gas tube, which is located above of the barrel.
The gas tube seems to run from the front-sight base to the AR 15 rifle's upper receiver. Now here, the gas tube telescopes to a 'gas key', which accepts gas and the funnels, it into a bolt carrier. The movement of the gas into bolt carrier uses to force the bolt and carrier in the opposite directions.
As bolt carrier uses to move towards the end of the rifle, the bolt starts to turn and also unlock from barrel extension. Once that bolt is completely unlocked, it resumes the backward movement with bolt carrier. The cam-pin is always responsible for the rotation of the bolt since it follows a typical groove cut into carrier, which twists and exerts force the bolt to unlock.
When the bolt is unlocked, then the bolt carrier and the bolt continue to shift towards the end of the rifle and the special type of casing is extracted and hence ejected out the side of the upper-receiver.
Again the return spring, which is located behind the buffer, pushes the bolt carrier hind towards the chamber. A special groove machined into the upper-receiver, traps the cam-pin and hence prevents it and bolt from rotating into the closed position. After that bolt's locking lugs push a fresh round, out of the magazine and up the feed ramps and also into the chamber.
When bolt's locking lugs shift past the barrel extension then the cam pin is permitted to twist into the pocket milled into upper-receiver. This action of twisting follows that special groove, cut into the carrier and uses to force the bolt to twist and 'lock' into the barrel's extension. Hope your lessons of the AR 15 working mechanism is clear now.