The Colt AR-15 is closely related to the military M16 and M4 Carbine rifles, which all share the same core design and have the same operating principle. The term “AR-15” is now most-commonly used to refer only to the civilian variants of the rifle which lack the fully automatic function.
While most earlier breech-loading rifles had a single receiver housing both the trigger and reloading mechanism, an innovative feature of the AR-15 was modular construction to simplify substitution of parts and avoid need for arsenal facilities for most repairs of malfunctioning military rifles. Watch the video from Thomas Schwenke for more info:
A distinctive two-part receiver is used by both military and sporting AR-15 style rifles. The initial design included a tube to vent burnt powder gas back into the bolt carrier assembly where it expands in a variable volume chamber forcing the bolt open to eject the spent cartridge case.
A buffer spring in the buttstock then pushes the bolt closed picking up a new cartridge from the magazine. This direct gas impingement (DGI) system has the disadvantage of venting un-burned smokeless powder residue into the receiver where it may ultimately accumulate in quantities causing malfunctions.