Help with recursion

USACO Guide - Bronze: Complete Search With Recursion
Can someone explain to me how the recursive solution works? I have some trouble understanding this and recursion in general.