This hand ($5$ cards of $52$) has the pattern $AAAAB$ where $A$ and $B$ are from distinct kinds. The number of such hands is $\binom{13}{1} \binom{4}{4} \binom{12}{1} \binom{4}{1}$. The probability is $0.000240$.
$\binom{13}{1} \binom{4}{4}$ I understand since there are $13$ choices and $4$ cards for that type but I don't understand why it's multiplied by $\binom{12}{1} \binom{4}{1}$.
What is the logic behind $\binom{12}{1} \binom{4}{1}$?
$\binom{12}{1}$ is the choice of the fifth card's rank; it can be any rank but the one chosen for four of a kind, so 12 remain.
$\binom{4}{1}$ is the choice of the fifth card's suit. It can be any of the four.
Usually I see the four of a kind lineup a little more succinctly:
$$\binom{13}{1}\binom{48}{1}$$
This is equivalent, because $\binom{4}{4}=1$, and $\binom{12}{1}\binom{4}{1}=12\cdot4=48=\binom{48}{1}$.