Hit points (or HP for short) are a vital statistic for all units in the Age of Empires Series. HP is a measure of how much damage an object can take before it is razed or killed. The Explorer (in Age of Empires III) faints when it's Hit Points reach 1. Units with Armor protects them from some damage and therefore prolongs the life of that unit.
In Age of Empires II, Units garrisoned inside a building will automatically regenerate their hitpoints slowly. Units garrisoned inside Castle regenerate hitpoints more quickly than in other buildings. Researching Herbal Medicine increases the rate at which units regenerate inside buildings.