Machine guns have been a big part of war ever since World War 1. By World War 2 and even after their purpose has not changed. The main use of machine guns is to suppress the enemy with a large volume of fire at a very fast rate. They make it difficult and scary for an enemy show their face or shoot back. Shooting accurately and calmly is near impossible with so many bullets coming your direction and often whizzing right by. These weapons are often mounted on a bipod to decreases recoil and better control.
Machine guns have a rifle sized caliber bullet, They were generally operated by a two-man team, one to shoot and the other to load and reload the machine gun. Sometimes it would be a squad with three or four men and the other men would bring more ammunition to the front.
In WW2 most rifles were bolt action so the average machine gun could shoot many more bullets than ten men with a bolt-action rifle. For example a German soldier with a Kar98k could shoot 15 rounds per minute at most while a soldier with an mg34 machine gun could shoot at least 800 rounds per minute with the slowest MG 34 model. That means it would take 53 men with a bolt-action rifle to match one MG 34 crew of 2-4 men but most often it would just be two men.
Some of the main machine guns of World War 2 were the American M1919 browning, British Bren, Soviet DP-28, German MG 34 and Japanese type 99. One of the best machine gun of the war was the German MG 42, which was introduced in 1942. It had the nickname Hitler’s buzz saw. It had an average rate of fire of 1,200 rounds per minute so that when it fired it was at too fast a rate to tell each shot apart. However the downside of this weapon was that it required more ammo to sustain it because the rounds were used so fast.
Now an obvious question is if these weapons have an equally powerful bullet to a rifle and at the same time a higher rate of fire and range than why did the army even have riflemen. Machine guns were much more expensive to make than a rifle. They were also heavier and less portable. The recoil was so much that it had to be mounted on a bipod to have decent accuracy. These weapons were perfect for defensive purposes to mount on a wall or a window but not in offense to assault a position. Those were better left to rifleman and submachine gunners.