Example: Raster Tiles
This is the “classical” job of osm2pgsql: Import data into a database, then use Mapnik or another rendering engine to create raster tiles from the data.
The “standard” OSM map you see below and on openstreetmap.org uses osm2pgsql, the Mapnik renderer and the OpenStreetMap Carto style. Some more information about it is on the OSM wiki. Many other maps use a similar setup.
To learn more about how to set up a raster tile server see switch2osm.