The general rule was to assign medics as early as possible to their respective combat units, once their initial boot camp and primary medical training was complete. There were some differences between Army and Marine Corps infantry units and the personnel they used,
Army medics initially went through regular Army boot camp like everyone else. Towards the end of boot camp, soldiers were assigned to their various technical specialties, and people selected to be medics were assigned based on a variety of factors such as ability, education, training, intelligence, aptitude, occupational history, military experience and other demonstrated qualifications. Sometimes, based on who was available and what their backgrounds were, you could be assigned to receive medic training on nothing more substantial than the fact you had previously once worked in a drug store. Once selected, the basic medic of World War II only received 2 to 3 weeks of instruction about first aid. They were taught how to put sulfa powder on a wound, apply a bandage, do tourniquets, administer pipettes of morphine, hand out pills, configure stretchers, and send the soldier back to an aid station, which in theory was always supposed to be no more than 1000 yards behind the front line. Army medics would train right alongside their assigned newly forming Army units as early as possible, and that meant usually while they were still back in the U.S. However, replacement medics were also needed for units that were already overseas, and so sometimes they would be shipped overseas as a group, and once in theater, parceled out as medic replacements to units already on the front line. And they needed a lot of replacement medics. Both the Germans and the Japanese specifically targeted medics and aimed for the white armbands or the red and white insignia on their helmets. Combat medics who wanted to survive quickly learned to paint over their helmets and ditch the armbands.
It was much the same for the Marine Corps infantry units, except they didn't use Marines. Marine units receive all their medical support from the U.S. Navy, and so combat medics for Marine rifle companies were all enlisted Navy Hospitalmen or Hospital Corpsmen ((HM). Traditionally, the Navy asks for volunteers among the HM ranks as to who wants to be a medic for a Marine unit, but not in every case.
When not in actual combat, both Marine and Army units tended to call their medics "Doc." When actually hit in combat and needing assistance though, Army soldiers almost universally called out "Medic!" and Marines always called out "Corpsman!" And it is pretty much still that way today.