When water evaporates from water bodies, it gets converted into its lightest physical state called water vapours.
These water vapours float in the air and meanwhile due to atmospheric pressure, they keep on moving to a higher altitude. Due to this, at higher altitudes, atmospheric pressure decreases and these vapours along with some dust and air gets condensed into clouds.
Clouds attain some electric charge also, due to which when 2 clouds strike thundering occurs.