Essentially, yes.

The data that you get in an XML export is used to maintain a separate “rendering database” on PostgreSQL which is optimised to return data ready for map display, and when someone moves around the map (at OpenStreetMap.org or on one of the many other OSM-based maps) the web server (Apache) requests map tiles via a plugin (mod_tile) which in turn requests that map tiles be rendered (by “renderd”) which in turn reads the rendering database.

If you’d like to set up your own OSM-like tile server you can follow the instructions at https://switch2osm.org/manually-building-a-tile-server-18-04-lts/ and you can load the database with anything you want - either a small data extract from OSM or some other non-OSM data that you have created. The best way to familiarise yourself with how all the pieces fit together is to actually set up a tile server yourself - then you’ll be able to see how things connect to each other.

If you’d like to visualise data that you’ve got in a .osm file then JOSM is probably the easiest way to do that. Obviously don’t load test or game data into the live OSM server though.

If you’re a little confused about some data that you’ve got in an extract from OSM you’ll need to post the location of it so that someone else can look at the data.