You are asking for "combinations with repetitions" (you want to choose the 3 piles, 9 times, allowing the same pile to be chosen more than once, but you don't care the order in which you select the piles); it is sometimes also called (because of a particular method of proving the formulas) stars and bars:
Imagine all $9$ marbles on a line, indicated by stars:
Now, insert two vertical bar to indicate where you will finish the piles. For example,
means that you have 4 marbles in the first pile, two on the second pile, and three in the last pile; or
means no marbles in the first pile, four on the second pile, and five in the third pile; and
means four marbles in the first pile, no marbles on the second pile, and five on the third pile.
So you need to choose where to put two vertical bars. How many ways are there to do so?