Recursion solves a problem by letting a function call itself on a smaller version of the problem until a simple base case is reached.