Steam engines can be made in a number of different ways. The piston steam engine, which was used primarily in locomotives, can be made with either a fire tube boiler or a water tube boiler. The heat from the fire boils the water, turns it into steam which is then captured and used to power a machine.
The first recorded steam engine or aeolipile, was made in the first century by Hero of alexandria.
Steampunk engines can be large enough to power a flying machine, or small enough to power hand weapons or lights. Indeed anything that needs to be powered!