The Law of Independent Assortment, states that alleles of different genes assort independently of one another during gamete formation.
In the dihybrid cross carried out by Mendel, in which YYRR (pea plant having yellow round seeds) is crossed with yyrr (pea plant having green wrinkled seeds), the hybrid obtained in F1 were all YRyr. But at the time of formation of gametes, these factors or genes segregate at random, with none of the factors influencing the other. The colour of the seed is in no way tied to the shape of the seed. Thus the yellow colour of the seed does not go only with round shape (as seen in the parent) but will also go with wrinkled seed. Similiarly green will also go with both round and wrinkled. Because of this independent assortment, we get ratio 9:3:3:1. If the factors were to amalgamate, instead of independent assortment, the ratio would be quite different.
Mendel concluded that different traits are inherited independently of each other, so that there is no relation, for example, between a cat's color and tail length. This is actually only true for genes that are not linked to each other.