The Medic is a biological Terran unit produced from the Barracks with an Academy built which has its primary function healing friendly biological units. Healing is automatic but directable and causes the Medic to use up exhaustible energy like a spellcaster (2HP per 1 energy). Like other spellcasters Medics start with 50 energy and generate up to 200 (with an increased maximum of 250 with an upgrade) and have no attack ability. Medics can only heal one unit at a time, and the same unit cannot be affected by multiple instances of healing.
The Academy can unlock Restoration which Medics can use to remove the effects of spells such as Plague and Lockdown on a single unit, and Optic Flare, which can be used to reduce enemy units' sight range to 1 and deactivate its detection, although these upgrades are rarely researched. Since Restoration affects units other than biological units, it can be used even in a transition to a build not focused on biological units.
These are researched at the Academy.
Marines are almost always used in combination with Medics, as Medics can replenish Marine health lost from using Stim Packs in addition to the health lost from enemy units' attacks. Proper micro and control of Medics with the rest of the bionic army, preferably with a hotkey group, is crucial to the strategy of MM. Medics have health and armor higher than Marines, which can be used in a bodyblock to extend the life of the Terran army.
Medics are absolutely essential in a Bio composition, the most commonly used and most versatile composition against Zerg. Medics extend the survivability of massed Marines by such a large amount that Bio can survive effectively against most Zerg units. While Marines deal an effective amount of damage and can kite to evade the attacks of many Zerg units their survivability against multiple large waves in massed compositions wears down quite quickly. With Medics this health can be replenished, greatly increasing the staying power of individual Marines.
Medics essentially nullify the cost of using Stim, allowing Marines to deal more damage with less drawback. If the Zerg is using Mutalisks, Marines and Medics are difficult to destroy without eliminating each unit in one hit. The Medic can also use restoration to negate the effect of the Defiler's plague on more expensive units. Optical Flare can be used against friendly units to block the effect of Parasite.
Tip : When you don't have Restoration, and don't want to waste energy by constantly healing plagued Marines, you can press the Move button and click on a Marine. This will prevent healing until you hit the stop / hold / attack / heal button.
Medics are generally not used against Terrans at the competitive level; Marines are not used often enough in this match-up to warrant the use of Medics to heal them. Optic Flare can easily be countered with floating buildings to extend sight for units, and Restoration is unnecessary in this match-up (although UpMagic used it once to un-Lockdown his Battlecruisers).
Medics may be used against the Protoss in a quick MM rush, though it is a very infrequently used strategy due to the difficulty of successful execution. However, they play a role in the Deep Six build. One of the potential problems encountered by Marines and Medics is that both Reavers and High Templar are known for taking down large numbers of Marines and Medics.
In one example game, Optic Flare was used on Observers to great effect: Example (Really Vs JangBi, Winner's League 2-10-2010)
Medics can be used as walling units to prevent melee units from reaching the Terran Marines or Siege Tanks. Enemy units that are attack-moving towards the Terran army will automatically try to attack the latter units, ignoring the Medics. This mechanic sees Medics blocking ramps and choke points to prevent Ultralisks and Zerglings from attacking the army.