A boiler or steam generator is a device used to create steam by applying heat energy to water.  Although the definitions are somewhat flexible, it can be said that older steam generators were commonly termed boilers and worked at low to medium pressure (7–2,000 kPa or 1–290 psi) but, at pressures above this, it is more usual to speak of a steam generator.
 A boiler or steam generator is used wherever a source of steam is required. The form and size depends on the application: mobile steam engines such as steam locomotives, portable engines and steam-powered road vehicles typically use a smaller boiler that forms an integral part of the vehicle; stationary steam engines, industrial installations and power stations will usually have a larger separate steam generating facility connected to the point-of-use by piping. A notable exception is the steam-powered fireless locomotive, where separately-generated steam is transferred to a receiver (tank) on the locomotive.
 The steam generator or steam boiler is an integral component of a steam engine when considered as a prime mover.  However it needs to be treated separately, as to some extent a variety of generator types can be combined with a variety of engine units. A boiler incorporates a firebox or furnace in order to burn the fuel and generate heat.  The generated heat is transferred to water to make steam, the process of boiling. This produces saturated steam at a rate which can vary according to the pressure above the boiling water. The higher the furnace temperature, the faster the steam production. The saturated steam thus produced can then either be used immediately to produce power via a turbine and alternator, or else may be further superheated to a higher temperature; this notably reduces suspended water content making a given volume of steam produce more work and creates a greater temperature gradient, which helps reduce the potential to form condensation. Any remaining heat in the combustion gases can then either be evacuated or made to pass through an economiser, the role of which is to warm the feed water before it reaches the boiler.
 For the first Newcomen engine of 1712, the boiler was little more than large brewer's kettle installed beneath the power cylinder. Because the engine's power was derived from the vacuum produced by condensation of the steam, the requirement was for large volumes of steam at very low pressure hardly more than 1 psi (6.9 kPa). The whole boiler was set into brickwork which retained some heat. A voluminous coal fire was lit on a grate beneath the slightly dished pan which gave a very small heating surface; there was therefore a great deal of heat wasted up the chimney. In later models, notably by John Smeaton, heating surface was considerably increased by making the gases heat the boiler sides, passing through a flue. Smeaton further lengthened the path of the gases by means of a spiral labyrinth flue beneath the boiler. These under-fired boilers were used in various forms throughout the 18th century. Some were of round section (haycock). A longer version on a rectangular plan was developed around 1775 by Boulton and Watt (wagon top boiler). This is what is today known as a three-pass boiler, the fire heating the underside, the gases then passing through a central square-section tubular flue and finally around the boiler sides.
 An early proponent of the cylindrical form was the British engineer John Blakey, who proposed his design in 1774. Another early proponent was the American engineer, Oliver Evans, who rightly recognised that the cylindrical form was the best from the point of view of mechanical resistance and towards the end of the 18th century began to incorporate it into his projects.[citation needed] Probably inspired by the writings on Leupold's "high-pressure" engine scheme that appeared in encyclopaedic works from 1725, Evans favoured "strong steam" i.e. non condensing engines in which the steam pressure alone drove the piston and was then exhausted to atmosphere. The advantage of strong steam as he saw it was that more work could be done by smaller volumes of steam; this enabled all the components to be reduced in size and engines could be adapted to transport and small installations. To this end he developed a long cylindrical wrought iron horizontal boiler into which was incorporated a single fire tube, at one end of which was placed the fire grate. The gas flow was then reversed into a passage or flue beneath the boiler barrel, then divided to return through side flues to join again at the chimney (Columbian engine boiler). Evans incorporated his cylindrical boiler into several engines, both stationary and mobile. Due to space and weight considerations the latter were one-pass exhausting directly from fire tube to chimney. Another proponent of "strong steam" at that time was the Cornishman, Richard Trevithick. His boilers worked at 40–50 psi (276–345 kPa) and were at first of hemispherical then cylindrical form. From 1804 onwards Trevithick produced a small two-pass or return flue boiler for semi-portable and locomotive engines. The Cornish boiler developed around 1812 by Richard Trevithick was both stronger and more efficient than the simple boilers which preceded it. It consisted of a cylindrical water tank around 27 feet (8.2 m) long and 7 feet (2.1 m) in diameter, and had a coal fire grate placed at one end of a single cylindrical tube about three feet wide which passed longitudinally inside the tank. The fire was tended from one end and the hot gases from it travelled along the tube and out of the other end, to be circulated back along flues running along the outside then a third time beneath the boiler barrel before being expelled into a chimney. This was later improved upon by another 3-pass boiler, the Lancashire boiler which had a pair of furnaces in separate tubes side-by-side. This was an important improvement since each furnace could be stoked at different times, allowing one to be cleaned while the other was operating.
 Railway locomotive boilers were usually of the 1-pass type, although in early days, 2-pass "return flue" boilers were common, especially with locomotives built by Timothy Hackworth.
 A significant step forward came in France in 1828 when Marc Seguin devised a two-pass boiler of which the second pass was formed by a bundle of multiple tubes. A similar design with natural induction used for marine purposes was the popular Scotch marine boiler.
 Prior to the Rainhill trials of 1829 Henry Booth, treasurer of the Liverpool and Manchester Railway suggested to George Stephenson, a scheme for a multi-tube one-pass horizontal boiler made up of two units: a firebox surrounded by water spaces and a boiler barrel consisting of two telescopic rings inside which were mounted 25 copper tubes; the tube bundle occupied much of the water space in the barrel and vastly improved heat transfer. Old George immediately communicated the scheme to his son Robert and this was the boiler used on Stephenson's Rocket, outright winner of the trial. The design formed the basis for all subsequent Stephensonian-built locomotives, being immediately taken up by other constructors; this pattern of fire-tube boiler has been built ever since.
 The 1712 boiler was assembled from riveted copper plates with a domed top made of lead in the first examples. Later boilers were made of small wrought iron plates riveted together. The problem was producing big enough plates, so that even pressures of around 50 psi (344.7 kPa) were not absolutely safe, nor was the cast iron hemispherical boiler initially used by Richard Trevithick. This construction with small plates persisted until the 1820s, when larger plates became feasible and could be rolled into a cylindrical form with just one butt-jointed seam reinforced by a gusset; Timothy Hackworth's Sans Pareil 11 of 1849 had a longitudinal welded seam. Welded construction for locomotive boilers was extremely slow to take hold.
 Once-through monotubular water tube boilers as used by Doble, Lamont and Pritchard are capable of withstanding considerable pressure and of releasing it without danger of explosion.
 The source of heat for a boiler is combustion of any of several fuels, such as wood, coal, oil, or natural gas. Nuclear fission is also used as a heat source for generating steam. Heat recovery steam generators (HRSGs) use the heat rejected from other processes such as gas turbines.
 In order to create optimum burning characteristics of the fire, air needs to be supplied both through the grate, and above the fire. Most boilers now depend on mechanical draft equipment rather than natural draught. This is because natural draught is subject to outside air conditions and temperature of flue gases leaving the furnace, as well as chimney height. All these factors make effective draught hard to attain and therefore make mechanical draught equipment much more economical. There are three types of mechanical draught:
 The next stage in the process is to boil water and make steam. The goal is to make the heat flow as completely as possible from the heat source to the water. The water is confined in a restricted space heated by the fire. The steam produced has lower density than the water and therefore will accumulate at the highest level in the vessel; its temperature will remain at boiling point and will only increase as pressure increases. Steam in this state (in equilibrium with the liquid water which is being evaporated within the boiler) is named "saturated steam". For example, saturated steam at atmospheric pressure boils at 100 °C (212 °F).  Saturated steam taken from the boiler may contain entrained water droplets, however a well designed boiler will supply virtually "dry" saturated steam, with very little entrained water.  Continued heating of the saturated steam will bring the steam to a "superheated" state, where the steam is heated to a temperature above the saturation temperature, and no liquid water can exist under this condition. Most reciprocating steam engines of the 19th century used saturated steam, however modern steam power plants universally use superheated steam which allows higher steam cycle efficiency.
 L.D. Porta gives the following equation determining the efficiency of a steam locomotive, applicable to steam engines of all kinds: power (kW) = steam Production (kg h−1)/Specific steam consumption (kg/kW h).
 A greater quantity of steam can be generated from a given quantity of water by superheating it. As the fire is burning at a much higher temperature than the saturated steam it produces, far more heat can be transferred to the once-formed steam by superheating it and turning the water droplets suspended therein into more steam and greatly reducing water consumption.
 The superheater works like coils on an air conditioning unit, however to a different end.  The steam piping (with steam flowing through it) is directed through the flue gas path in the boiler furnace.  This area typically is between 1,300–1,600 °C (2,372–2,912 °F). Some superheaters are radiant type (absorb heat by thermal radiation), others are convection type (absorb heat via a fluid i.e. gas) and some are a combination of the two.  So whether by convection or radiation the extreme heat in the boiler furnace/flue gas path will also heat the superheater steam piping and the steam within as well.  While the temperature of the steam in the superheater is raised, the pressure of the steam is not: the turbine or moving pistons offer a "continuously expanding space" and the pressure remains the same as that of the boiler. The process of superheating steam is most importantly designed to remove all droplets entrained in the steam to prevent damage to the turbine blading and/or associated piping. Superheating the steam expands the volume of steam, which allows a given quantity (by weight) of steam to generate more power.
 When the totality of the droplets is eliminated, the steam is said to be in a superheated state.
 In a Stephensonian firetube locomotive boiler, this entails routing the saturated steam through small diameter pipes suspended inside large diameter firetubes putting them in contact with the hot gases exiting the firebox; the saturated steam flows backwards from the wet header towards the firebox, then forwards again to the dry header. Superheating only began to be generally adopted for locomotives around the year 1900 due to problems of overheating of and lubrication of the moving parts in the cylinders and steam chests.
Many firetube boilers heat water until it boils, and then the steam is used at saturation temperature in other words the temperature of the boiling point of water at a given pressure (saturated steam); this still contains a large proportion of water in suspension. Saturated steam can and has been directly used by an engine, but as the suspended water cannot expand and do work and work implies temperature drop, much of the working fluid is wasted along with the fuel expended to produce it.
 Another way to rapidly produce steam is to feed the water under pressure into a tube or tubes surrounded by the combustion gases. The earliest example of this was developed by Goldsworthy Gurney in the late 1820s for use in steam road carriages. This boiler was ultra-compact and light in weight and this arrangement has since become the norm for marine and stationary applications. The tubes frequently have a large number of bends and sometimes fins to maximize the surface area. This type of boiler is generally preferred in high pressure applications since the high pressure water/steam is contained within narrow pipes which can contain the pressure with a thinner wall. It can however be susceptible to damage by vibration in surface transport appliances. In a cast iron sectional boiler, sometimes called a "pork chop boiler" the water is contained inside cast iron sections. These sections are mechanically assembled on site to create the finished boiler.
 Supercritical steam generators are frequently used for the production of electric power. They operate at supercritical pressure. In contrast to a "subcritical boiler", a supercritical steam generator operates at such a high pressure (over 3,200 psi or 22.06 MPa) that actual boiling ceases to occur, the boiler has no liquid water - steam separation. There is no generation of steam bubbles within the water, because the pressure is above the critical pressure at which steam bubbles can form. It passes below the critical point as it does work in a high-pressure turbine and enters the generator's condenser. This results in slightly less fuel use and therefore less greenhouse gas production. The term "boiler" should not be used for a supercritical pressure steam generator, as no "boiling" actually occurs in this device.
 Feed water for boilers needs to be as pure as possible with a minimum of suspended solids and dissolved impurities which cause corrosion, foaming and water carryover. The most common options for demineralization of boiler feedwater are reverse osmosis (RO) and ion exchange (IX).
 When water is converted to steam it expands in volume 1,600 times and travels down steam pipes at over 25 m/s. Because of this, steam is a good way of moving energy and heat around a site from a central boiler house to where it is needed, but without the right boiler feed water treatment, a steam-raising plant will suffer from scale formation and corrosion. At best, this increases energy costs and can lead to poor quality steam, reduced efficiency, shorter plant life and an operation which is unreliable. At worst, it can lead to catastrophic failure and loss of life. While variations in standards may exist in different countries, stringent legal, testing, training and certification is applied to try to minimize or prevent such occurrences. Failure modes include:
 The Doble steam car uses a once-through type contra-flow generator, consisting of a continuous tube. The fire here is on top of the coil instead of underneath. Water is pumped into the tube at the bottom and the steam is drawn off at the top. This means that every particle of water and steam must necessarily pass through every part of the generator causing an intense circulation which prevents any sediment or scale from forming on the inside of the tube. Water enters the bottom of this tube at the flow rate of 600 feet (183 m) a second with less than two quarts of water in the tube at any one time.
 As the hot gases pass down between the coils, they gradually cool, as the heat is being absorbed by the water. The last portion of the generator with which the gases come into contact remains the cold incoming water.
 The fire is positively cut off when the pressure reaches a pre-determined point, usually set at 750 psi (5.2 MPa), cold water pressure; a safety valve set at 1,200 lb (544 kg) provides added protection. The fire is automatically cut off by temperature as well as pressure, so in case the boiler were completely dry it would be impossible to damage the coil as the fire would be automatically cut off by the temperature.
 Similar forced circulation generators, such as the Pritchard and Lamont and Velox boilers present the same advantages.
 Steam boilers are used where steam and hot steam is needed. Hence, steam boilers are used as generators to produce electricity in the energy business. It is also used in rice mills for parboiling and drying. Besides many different application areas in the industry for example in heating systems or for cement production, steam boilers are used in  agriculture as well for soil steaming.
 The preeminent code for testing fired steam generators in the USA is the American Society of Mechanical Engineers (ASME) performance test code, PTC 4. A related component is the regenerative air heater. A major revision to the performance test code for air heaters will be published in 2013. Copies of the draft are available for review. The European standards for acceptance test of steam boilers are EN 12952-15 and EN 12953-11. The British standards BS 845-1 and BS 845-2 remain also in use in the UK.