They breathed fire by ejecting a chemical from their stomach that would ignite upon reaching oxygen as it left the dragons mouth. Mudfossil University explains and shows the larger dragons still there which are now mountains.