An automatic firearm is a firearm which will keep firing as long as the trigger is being pulled and there is still ammunition in the magazine.
An automatic weapon works by firing, automatically removing the cartridge case from the chamber, ejecting it from the side of the gun, and then loads a new cartridge into the chamber.