
Explain like I'm five
Imagine you're looking into two mirrors facing each other — you see an infinite series of smaller and smaller reflections of yourself. Recursion is like that: a task that keeps doing a smaller version of itself until it reaches the simplest possible case. For example, to find out how many people are in a line, you ask the first person, who asks the next, and so on, until the last person says '1,' and the answer gets passed back down the line.

Why it matters
Recursion lets you solve complex problems with elegantly simple code, especially for tasks like traversing file systems or processing tree structures. You encounter it in algorithms for sorting, searching, and parsing, where breaking a problem into smaller pieces is natural.

Common misconception
The biggest mix-up is thinking recursion is just a function calling itself forever. Actually, every recursive function must have a base case that stops the calls, or it will run infinitely and crash your program.

Formal definition
Recursion is a method where the solution to a problem depends on solutions to smaller instances of the same problem. A recursive function typically has a base case that returns a direct answer and a recursive case that calls itself with modified arguments. This approach is common in divide-and-conquer algorithms, tree traversals, and functional programming.