Thunderclouds are charged with a large amount of negative charges. The charges arise due to the friction between the water molecules and air molecules as the wind shifts them around.
These highly charged clouds ionize the air around it, which causes the air bodies near the clouds to be slightly conductive. The Earth is at a higher potential than the clouds, hence the negative charges in the cloud will want to go to the ground. These negative charges will flow through the ionized air (conductive) to the ground. During this process, the air is heated up rapidly which produces the light (lightning) and sound (thunder). The negative charges will typically take the shortest path possible between the thunderclouds and the ground. Hence, it is dangerous to stand under trees, swim in the sea or play in an open field during thunderstorm.
Buildings, especially tall ones, are frequently subjected to lightning attacks. If a building is not suitably “protected”, its structure would be severely damaged in the process. Lightning rods are now fitted in top of buildings for protection. When thunderclouds are nearby, positive charges are induced on the lightning conductors. The induced positive charges remove the electrons from the nearby air and ionise the surrounding air. The positively charged air then flow upwards to neutralize the thundercloud.