Lightning is exactly the same as the spark that you get in the winter from shuffling across the carpet or rubbing a balloon in your hair.
Electrostatic force generally comes from frictional rubbing of different substances. One substance ‘steals’ electrons from the other substance (determined by the TriboElectric Series). A Thunder Cloud has very energetic winds that drive ice particles through the air like a giant van de Graaff generator. This creates a positive charge collection at the top of the cloud with the corresponding negative charge at the bottom. This negative charge is what gets delivered to the ground a lightning.
(In all fairness, once the electric charge is moving in a spark, we no longer have a ‘static’ situation)