Repair is a command available to units with the abilities, "Engineering Suite" and "Repairs", such as Engineers, the Armored Command Unit, and also the Mantis and Harbinger (Aeon T3 Assault Bot). These units, when commanded to assist other units, will automatically repair them if they become damaged. Repairing units is essentially the same as reconstructing the unit, in terms of resource cost and speed, based on the unit's build power. Units being repaired are free to fire and move, although moving out of build range of the units repairing it will cancel the repair command.
The cost inefficiency to using the Repair command to restore HP to units makes it a command that you should use selectively. A damaged unit that is 30% HP will cost 70% of its total cost to be fully repaired. A damaged shield with 50% shield HP remaining will cost 50% of its total cost to be repaired, not considering its natural shield regeneration. While seeming to be an inferior option based on cost effectiveness compared to reclaiming the damaged unit to get up to 90% of its mass value and using that mass to rebuild another, Repair is an useful command to extend the life of units currently under fire. For example, if a single Seraphim T1 Attack Bomber is targeting a group of T1 Power Generators, it needs 3 passes to kill them since each bomb does 300 damage to the 900 HP units, but if you repair just 1 HP to each, it will need an additional pass to kill them, buying yourself more time. Another example would be to use it to repair a high damage unit that is at risk of dying in battle, such as an Galactic Colossus defending by a few T2 Shields, and T2 Point Defense, versus an enemy assault of 2 moderately damaged Galactic Colossus, by repairing your single GC, it might be able to fend off this attack which would otherwise march straight on through.
It is impractical to use the Repair command on certain units, such as aircraft and the Armored Command Unit. Using an Air Staging Facility or another unit with the Air Staging ability, such as Aircraft Carriers, will repair and refuel your aircraft faster and at a significantly less expensive rate. The ACU is a very expensive unit and you would be an extreme drain on your economy should you being repair it. It is better to build a shield unit of some type, find cover, and/or upgrade the ACU to give it more survivability if it is in danger.