There are two types of operating systems that can transmit WiFi signal to your device at 35,000ft – ground-based and satellite.
Air-to-ground (ATG) WiFi connects similar to your cell phone. The antennas located underneath the fuselage send and receive signals from ground-based mobile broadband towers. As the aircraft travels, it simply connects to the nearest transmitter on a rolling basis. However, this system will not work when the aircraft is flying over the large expansion of water, like on transatlantic routes. That’s where satellite transmission is used.
In satellite technology, airplanes connect to satellites in geostationary orbit (35,786km above the planet), which send and receive signals to earth via receivers and transmitters.. The transmission is linked via satellite antenna on the top of the fuselage. The plane switches to nearest satellite as it travels. Wi-Fi signal is distributed to passengers (devices) via an onboard router.
Satellite WiFi operates on two different bandwidths: narrow band and broadband. Both allow passengers full internet access, although the narrower options are less suitable for streaming movies.
Just imagine an airplane flying at around 900km/h connects to a satellite orbiting the Earth at 28,000 km/h (3.07 km/s) at a distance of 35,786km above the planet.