Depending if you fly IFR or VFR and at what altitude, you will talk to either a flight information service (FIS), Radar or Area Control Center (ACC).
Hand-off is usually done a few miles from the border of the next country you're going to pass. You tell them who you are and where you're going to. They can let you fly as planned or give you another route or altitude.
From a pilot's point of view is pretty simple and straightforward.
Before that, I have no clue if something existed or you would just ring up the destination aerodrome to let them know you're coming.
There is cooperation between states, with the best example I know of being the Maastricht Upper Area Control Centre (MUAC) which was established in 1972 by Eurocontrol and manages the upper airspace (above 24,500 feet) over Belgium, Luxembourg, the Netherlands, and northwest Germany.
Eurocontrol is the first and, to the best of my knowledge, the only successful attempt to pool controllers between countries in Europe.
https://en.wikipedia.org/wiki/International_Civil_Aviation_O...