Formal and elevated — used in commemorative, official, and educational contexts (war memorials, state ceremonies, school textbooks). For everyday 'hero,' use
英雄 (yīngxióng).
烈士 (lièshì, 'martyr') is the legal/official term for an individual;
英烈 is more poetic/collective.