How does Lightning Happen?

Lightning happens when clouds release an electrostatic discharge, like a static electric shock. What actually causes these clouds to generate the electric charges is a mystery that scientist cannot fully explain.