How D365 Retail channel database and HQ database communicate with each other

I’m working on a project where I need to understand how data is communicated between POS and HQ,
I know there are few jobs that work for this purpose but I want to know how these jobs exactly send or receive the data, either these Jobs use APIs or some files to hold the data.

  1. How transactions are sent from POS to HQ
  2. How does HQ differentiate that these transactions came from a particular store/device
  3. How the Offline database communicates with the AX/D365 Retail
  4. Does the creation of a channel database in AX is just for identification, and do we actually create the database on-prem where our actual device is installed?

It would be kind enough if someone can answer my questions, before you refer me to some links I want to tell you that I’ve already spent days and could not understand behind-the-scene logics.

My concern is with Offline POS and AX only, not eCommerce or online, etc.

Thank you.