Rifles were the most common infantry weapons in World War 2. There were many more rifleman than both submachine gunners and light machine gunners. In World War 2 there were two main different types of rifles, bolt-action and semi-automatic.
One type of rifle was the standard bolt-action rifle. These rifles were older and had been used in huge numbers during World War 1. These types of rifles had a handle that needed to be pulled back manually each time before the rifle was fired. This causes a much slower rate of fire than automatic weapons or even semi-automatic rifles. These were the most common types of rifles on the battlefields of World War 2 because of how cheap and mass produced they were. Many were left over from previous wars. They sometimes had telescopic sights would be attached to these rifles to make them into sniper rifles. Most bolt-action rifles had clips of 5 rounds. Examples were the German Kar98k, Soviet Mosin-Nagant, Japanese Arisaka and Britism Lee-Enfield, and Italian Carcano.
Semi-automatic were newer so none had been produced before the war. These rifles were rare for most countries until later on in the war. For example the German Gewher-43 was produced from 1943 so up until then all German rifles were the Kar98k bolt-action rifles. The Soviet SVT-40 semi-automatic rifle was produced in far less numbers than the older Mosin-Nagant bolt-action rifle. The main advantage of semi-automatic rifles was that they could fire as fast as the trigger was pulled. Also they usually held more ammunition than their bolt-action counterparts.
Rifles were used best at medium range. At close range they were not very useful especially the bolt action rifles because of the slow firing rate. Any rifleman would be at a severe disadvantage against a submachine gunner in close range. They could be used at very long ranges especially if the target was not moving or the rifle was equipped with a scope.