There are $n$ slots to fill with $k$ objects, $n < k$, and order doesn't matter. For example, if you had to fill ten bottles with either coffee, tea, or water, how many ways are there to fill them?
By definition in that case
For your example, which is another problem, by stars and bars method, we can prove that we have (choose $n=10$ times from a set of $k=3$ objects with replacement):
Refer also to the related