Why does lightning flash?

Lightning is a giant spark when electric charge jumps between clouds or to the ground.