Mental Model
A function calls itself with a smaller number until it reaches 1, then builds the answer back up.
Analogy: Imagine stacking blocks: to find the total height, you ask the block below for its height, and so on until the bottom block, then add up all heights.
factorial(3)
↓ calls factorial(2)
↓ calls factorial(1)
↓ returns 1
← returns 2 * 1 = 2
← returns 3 * 2 = 6