Formal and elevated - used in commemorative, official, and educational contexts (war memorials, state ceremonies, school textbooks). For everyday 'hero,' use
英雄.
烈士 ('martyr') is the legal/official term for an individual;
英烈 is more poetic/collective.