The PBF is the all OSM information, you normally need to process it in order to use it. The best way to do this will depend on exactly what you want to do.
I simply have no idea how to use the PBF file …
Very new here.
the pbf is OpenStreetMap data in binary form, it doesn’t display on its own, typically you would either create raster tiles from it (rendering some of the data with rules where you define how it should look like), or vector tiles(transformed osm data that is tiled/split into regular chunks so you don’t have to download the whole world to see something) and define rules for the latter.
I think you’re starting this from the wrong end. A .pbf file is “just some OSM data”. You can convert that into any format that you can read on the device (perhaps a SQLite database?) and then on the device you’ll want to display some of that data as “markers” (in what way you don’t say).
I’d get the functionality you want working with a really simple OSM data file (in normal XML format) before worrying about .PBF files.
Depending on the zoom level, Leaflet with raster tiles on the filesystem might be an option. To be clear, this absolutely isn’t the best solution in 2023 (it’s doubtful that it was about 10 years ago when I wrote that as a PoC), but it is HTML, simple and Leaflet is well-documented.
For a start, I would rather get the tiles in the typical directory structure ( zoom/x/y.png for raster) and use leaflet to show them. You can get the tiles by buying them from someone who sells tile packs, or scrape them from the web (may not be compatible license wise depending from where you get them), or produce them on your own (with a rendering program, e.g. mapnik or maperitive or osmarender).
It depends how big of an area you want to cover and in which detail (max zoom level).
Vector tiles are much nicer for display because they use the full screen resolution (high definition) without requiring more storage space, and if they are rendered locally, they can adopt to the situation (e.g. rotate labels), but they are much more complex compared the raster tiles. If you get it working with raster tiles, you can still change the map to vector tiles later.
Purely theoretically, if I were wanting to do this for a desktop computer, I’d do a quick map viewer app in Electron. One half is the “client” which would just be MapLibre GL JS with a bit of chrome around the edge. The other half is the “server”, which would consume pre-built vector tile packages from Geofabrik, and serve them on an (internal) HTTP endpoint so that MapLibre could consume them.
For someone who knew what they were doing it would be pretty straightforward, but Node.js is not my bag.
To begin with, it would be preferable to obtain the tiles in the standard directory format (e.g., zoom/x/y.png for raster tiles) and utilize Leaflet to display them. The tiles can be acquired by purchasing them from a tile pack vendor, extracting them from the web (although this may raise license compatibility concerns depending on the source), or generating them independently using rendering software such as Mapnik.