In Tiny Heroes on the iPhone, there is an achievement that you can get for repairing 200 defenses. However, I don't see any way to repair defenses.
Apparently, it is an actual Defense that you use, not a general game mechanic that you need to use. It unlocks in the second campaign.
From a thread on Touch Arcade: