It doesn't really "understand" anything. At a high level, it picks out words from titles and matches them with other titles - the more rare the words are, the higher the match, the more words that match, the higher the match.