Instructions
Create a Medivac. To build one, you must first build a Barracks, Factory and Starport. You can then build a Medivac from a Starport for the cost of 100 minerals and 100 Vespene gas.
Fly the Medivac over the units you want it to guard. For example, if you want to guard an army of marines outside your main base, click the Medivac, then right-click the group of marines. The Medivac will begin flying to the location.
Move the Medivac with any units you want it to guard. Medivacs automatically protect units nearby by healing them. As long as the Medivac is hovering over the units you want to protect, protection is guaranteed.