The boiler is used to heat Liquids (mainly water). When fueled it raises the temperature of water flowing through it. The resulting temperature depends on the speed of the liquid flow. In other words: The longer the water can stay in the boiler, the hotter it will become.
Boilers are the main source of pollution in the early and midgame.
Inserter can take from boiler
You can insert into boilers, but also take fuel out. See this post and follow ups.
This can be also used to create an early filter-device, which filters only fuel items: One inserter inserts into a boiler (not connected to water) another take the fuel out.