How does a boiler room work?
Well, `boiler room' can mean several different things. Assuming that you just mean a room with a boiler, and want to know how a boiler works, that's easy enough ... In a boiler a liquid is heated and maybe vaporized. Usually the liquid is water. Once heated, the water or steam is used to heat the rest of the building, but it can be used for other things as well. I could go into a lot more detail, but the wikipedia pages below cover the issue pretty well. (And I've included pages for other type of boiler rooms, in case you're asking about one of the other types.)
A boiler room usually contains all the components that the heating system needs to function properly. All these equipment items need routine and preventative maintenance, so it makes practical sense to put them in a room together. Depending on the type of boiler, there may be pumps, expansion tanks and air separators in the room. There could also be related components like glycol feeder tanks and heat exchangers too.