There's all kinds of automatic weapons though they break down into some basic groups:
Gatling gun: Developed in 1860s. Lots or barrels set in a rotating circle and fire one at a time. Very big and slow, (but faster than single-shot muskets). Updated to ultra-high rate of fire for sophisticated weapons systems in the 20th century.
Machine guns: developed in the 1880s. Originally big things lugged about on wheels. Fire powerful rifle rounds linked into chains. Sometime needs a team to fire. Revolutionized warfare in WWI. Browning .50 cal is an example, WWII era but still in use.
Light Machine Guns: Machine gun that can be carried and fired by an individual soldier. Some fire from a magazine (eg Bren or DP28, WWII-era). Some use a chain (M-60, US, Vietnam-era)
Automatic Rifle: a rifle that can fire automatically. Concept emerged early on, but did not catch on until post-WWII. A personal battle weapon. The US has the M-16 (developed in 1960), Russia the AK-47 (developed 1947, the designer is still alive). Either one is light, portable, rugged and relatively easy to figure out. Carries a magazine. AK-47s are ubiquitous, especially in those wars with child soldiers.
Sub-machine gun: Developed toward the end of WWI. Fires pistol rounds, which are generally less powerful than rifles. Examples: Tompson SMG (1918, US), Sten (WWII-era, UK), HK MP-5 (German, 1970s). Not so common with military any more, but still employed by police special-weapons teams.
That might get you started on some scene-setting. Learning to load & fire weapons isn't so hard, but isn't necessarily obvious. Hitting things is trickier. As you noted, you can set up some familiarity before-hand. A group of targets bunched together is easier to hit, especially if they are too surprised to duck or scatter.