A magma smelter is a special variation of the basic smelter that uses magma as a source of heat, instead of fuel.
To function, magma smelters must be built with at least one of the eight edge tiles occupying an open space with at least 4/7 magma on the next floor down. If the only opening to the magma is under the impassable tile of the building, then magma creatures won't be able to enter the workshop area through the opening; otherwise they can.
Note that both pig iron and steel production still require fuel as a source of carbon for the reaction.
Magma smelters do not consume any magma from their magma source — you can use a single tile of magma below the smelter as an infinite heat source.