It takes several things, and none of them is 100%. First you have to know about the types of clouds. White clouds like sheeps usually are not for rain, and dark flat clouds are usually storm or rain clouds, but not every time.
Second as pankaj mahajan said cold air. When it get`s windy, there`s some chance for rain :). With combination of clouds and other symptoms you can have some probability of perdicting a rain :).