One of the very first automatic weapons, or “machine guns”, the Gatling gun had multiple barrels, and as the crank was turned, the barrles rotated and fired one by one. This is very well known, and we still use improved versions of the Gatling gun today on helicopters and airplanes
The Maxim gun, unlike the Gatling gun, had only one barrel, and was the first self-powered machine gun. This means that the mechanism used the recoil from the firing bullet to force the spent shell out of the barrel and a fresh one into it. This was a very important invention, because it greatly improved the rate of fire and lessened the time and men it took to load the gun. Also, many of our modern guns, including rifles, use this mechanism today.