The Cholesky algorithm is a recursive method for calculating the decomposition matrix L using Gaussian elimination. It works by starting with the first row/column of the matrix A and subtracting the appropriate multiple of that row from subsequent rows, leaving the upper left portion as an identity matrix at each step. Repeating this process for each row/column from 1 to n results in the original matrix A being decomposed into the product of the lower triangular matrix L and its transpose.