How are positive and negative charges produced during a thunderstorm?

How are positive and negative charges produced during a thunderstorm ?
**A.**Clouds are very small droplets of water in the form of vapour. A patch of cloud develops an electric charge on it by friction. The upper layers of cloud get positively charged and the lower layers of cloud get negatively charged.