Mental Model
A function calls itself with a smaller number until it reaches 1, then multiplies back up to get the factorial.
Analogy: Imagine stacking blocks: you keep adding one block on top of the smaller stack until you have one block, then count the total by multiplying the heights as you go back down.
factorial(3)
↓ calls factorial(2)
↓ calls factorial(1)
↓ returns 1
← returns 2 * 1 = 2
← returns 3 * 2 = 6