Good write-up of the basics.
There's of course much more going on if you dig deeper into the real details. WPA/WPA2 encryption, smart jumping between frequency bands, calibrating signal strength, etc.
We take Wifi technology as a given nowadays with all our phones, tablets, and laptops constantly connecting to different networks, but its absolute sorcery what happens during the handshake, DHCP process, and other processes that happen within seconds to give us our pipeline to the world.