Clouds are said to be condensed water vapor in the air, high up in the sky. When we see black clouds in the sky, we all believe that it is going to rain. Grey or black clouds are formed by a combination of small and large water droplets. They are responsible for the rain. White clouds are formed from warm air that consists of water vapor. Yellow and red clouds appear due to scattering of light at dawn or sunset.
The reason why clouds form is due to the higher temperature of the warm air rising up than the temperature of air surrounding the warm air packet. This warm air packet is the source of the cloud. Another reason why clouds are formed is due to dust particles and bacteria, present in the air, that come in contact with the warm air packet.
Coming to the process of formation of the warm air packet that ultimately leads to the formation of clouds, takes place like this: The warm air on the immediate surface of the earth is created either due to the excess heat of the day or due to evaporation of water. As the warm air is less dense, the warm air packet moves up, and keeps moving up. While it is moving up due to a decrease in atmospheric pressure, the packet expands. It is natural that when air expands due to a decrease in pressure, it also cools. So the warm air packet goes up, expands and cools. It is found that it cools approximately by ten degrees Celsius for every 1000 meters it rises.
This process continues until equilibrium is reached between the temperature of warm air packet and the temperature of the surrounding air. When this process is going on simultaneously, at many stages the rising warm air packet gets condensed into small water droplets, and forms small clouds. As the warm air packet reaches higher up, a continuous, elongated cloud will be formed. By the time the packet reaches equilibrium, the clouds are formed properly, and they might have become matured. Matured clouds are grey or black clouds which consist of large water droplets which are ready to fall.
So clouds are formed to equalize the temperature in the air, and due to condensing of water vapor when other particles touch the cool water vapor.