A subsequence of a sequence keeps some of its elements, in their order, and drops the others: LIBRY is a subsequence of LIBRARY. A longest common subsequence of two sequences is a sequence that is a subsequence of both, and as long as possible.
LIBRARY (rows) and LITERARY (columns). The shaded cells are the path of the rebuild, from the bottom right back to the top left; at each circled cell the two letters are equal, and that letter belongs to the subsequence: L, I, R, A, R, Y.