Tellus interview question

Describe recursion, when would you use a class vs a function.