This uses recursive calls (CalDet calls CalDet with smaller matrices until the size is 1x1). I.e., the recursion continues all the way down until the input is a 1x1 matrix, at which point the result is simply M(1,1) and then the results get passed back up through the stack of calls.
See Laplace's expansion and the adjugate matrix here:
BTW, this is not a good numerical technique.