Answer by Thomas Zerbarini:
The WiFi on aircraft over oceans is piped in via Satellite. Similar to the way you can get WiFi from a Satellite TV service provider.
When WiFi was originally offered on aircraft it was used with on the ground cell towers like GoGo.
Then United Airlines became the first airline in 2011 to offer over ocean WiFi using a new Ka satellite.
In 2014 Delta offered international WiFi