Fire doors are needed in all public, commercial and multiple occupancy buildings. (So, you won’t, for instance, need fire doors in your typical family house but you will need them in a block of flats.)
For domestic dwellings more than two storey high, a fire door is required on every level to separate the stairwell from every habitable room. They’re also needed in loft conversions and between a house and an integral garage.
For mixed-use buildings, you’ll need a fire door to separate non-domestic (business) areas from domestic (residential) parts of the building.
For non-domestic buildings, it’s a little more complicated as each building is different. Guidance states the building is divided into separate sections for horizontal and vertical escape routes. This is usually factored into the make-up of the building’s design before it’s even built.