[deleted]
For a US Infantry company, the Table of Organization and Equipment (TO&E) was laid out in Field Manual FM 7-10. That manual determines how many of each type of weapon are authorized and how they are assigned. The individual soldiers were trained on their speciality (rifleman, automatic rifleman, light machinegunner, etc.) during initial training. The commander could task organize as he saw fit, so MGs could be parceled out to platoons as needed, and so on. As units took losses, the remaining soldiers might be reorganized significantly.