Hospitals are used to heal units and heroes after battles. The higher the level of the hospital as compared to the level of the unit or hero, the faster the healing would be.