You are asking for the probability of what in poker is called a full house.
There are $\binom{52}{5}$ ways to choose $5$ cards from the standard deck of $52$. All these ways are equally likely.
Now we count the number of hands that have a triple and a pair.
The kind of card you have three of can be chosen in $\binom{13}{1}$ ways, or, more simply, in $13$ ways. (By kind here we mean Ace, or King, or Queen, and so on.) For every choice of kind, there are $\binom{4}{3}$ ways of choosing the actual cards of that kind. The number $\binom{4}{3}$ is simply $4$, but I want to concentrate on the structure, so that you can apply similar reasoning to other problems.
For every way of doing the above two tasks, there are $\binom{12}{1}$ ways of choosing the kind of card you have two of. And for every such choice, there are $\binom{4}{2}$ ways of choosing the actual two cards.
Thus the total number of "full house" hands is $\binom{13}{1}\binom{4}{3}\binom{12}{1}\binom{4}{2}.$ Divide by $\binom{52}{5}$ to find the probability.