A semiautomatic or a self-loading weapon is one in which, after firing the first shot, the kinetic energy from the recoil prepares the weapon for the next discharge. The slide is the key component to the functioning of a semi-automatic, as the slide moves along the axis of the barrel, which is held in place using the tension of a spring.
When a trigger is pulled, the slide is accelerated backwards with the force of the recoil. The empty shell then hits a piece of metal that protrudes outwards near the back of the barrel. This motion ejects the shell casing outwards from the gap built into the slide. This rearward motion also re-cocks the hammer. This semi automatic action is used in numerous, handguns, rifles, sniper rifles, and even a few shotguns.