How are airplanes grounded?
I think you need to know the difference between "ground" and "earth".

Ground is the term EEs use for a reference point. In principle we're completely free to choose any reference point we like (crazy example: the + terminal of the 9 V battery lying on my desk). Some choices of Ground are more sane than others, my crazy example is a pointless reference but the metal chassis of an amplifier, a car or an airplane is a good one. Also the - pole of a battery might be a good choice.

Earth is usually an actual connection to our planet earth like a metal pin sticking in the earth. This is used to make a "safe to touch" connection in a mains (120 V or 240 V AC) setup like in your house. You would not want the get an electric shock when you touch the metal frame of your washing machine. So we connect it to earth.

At the same time we often also use this earth as the ground (reference) of our circuit so then earth = ground. They're connected and they're the same.

It is difficult to answer what happens when lightning strikes because many different scenarios are possible and it heavily depends on what happened exactly. Also, a direct lightning strike contains a lot of energy, it isn't always possible to make the electronics survive such a hit without damage.