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: to find the total height, you stack one block and then ask how tall the rest of the stack is, repeating until only one block is left.
factorial(3)
↓ calls factorial(2)
↓ calls factorial(1)
↓ returns 1
← multiply 2 * 1 = 2
← multiply 3 * 2 = 6
result = 6