You use this formula when you have a permutation with indistinguishable objects.
For instance, you would use it to determine the number of distinct ways to arrange four blue balls, three red balls, and two green balls that are identical except for their colors in a line. We have nine positions to fill. We can fill four of the nine positions with blue balls in $\binom{9}{4}$ ways. This leaves us with five open positions. We can fill three of them with red balls in $\binom{5}{3}$ ways. This leaves us with two open positions, which we can fill with the two green balls in $\binom{2}{2}$ ways. This gives us
since there are $\binom{4}{2}$ ways of filling two of the four places with a B and $\binom{2}{2}$ ways of filling the remaining two places with a G. The corresponding sequences are BBGG, BGBG, BGGB, GGBB, GBGB, and GBBG.
You use this formula when you have a permutation with indistinguishable objects.
For instance, you would use it to determine the number of distinct ways to arrange four blue balls, three red balls, and two green balls that are identical except for their colors in a line. We have nine positions to fill. We can fill four of the nine positions with blue balls in $\binom{9}{4}$ ways. This leaves us with five open positions. We can fill three of them with red balls in $\binom{5}{3}$ ways. This leaves us with two open positions, which we can fill with the two green balls in $\binom{2}{2}$ ways. This gives us
$$\binom{9}{4}\binom{5}{3}\binom{2}{2} = \frac{9!}{4!5!} \cdot \frac{5!}{3!2!} \cdot \frac{2!}{2!0!} = \frac{9!}{4!3!2!}$$
distinguishable arrangements of four blue balls, three red balls, and two green balls in a line.
The number of distinct ways of arranging the letters BBGG in a line is
$$\binom{4}{2}\binom{2}{2} = \frac{4!}{2!2!} \cdot \frac{2!}{0!2!} = \frac{4!}{2!2!} = 6$$
since there are $\binom{4}{2}$ ways of filling two of the four places with a B and $\binom{2}{2}$ ways of filling the remaining two places with a G. The corresponding sequences are BBGG, BGBG, BGGB, GGBB, GBGB, and GBBG.