Term Frequency-Inverse Document Frequency measures relevance. TF: how often term appears in document (more = more relevant). IDF: how rare term is across corpus (rarer = more distinctive).
Score = TF × IDF. "The" appears everywhere (low IDF), "quantum" is rare (high IDF). A document with "quantum" times scores higher than one mention. Foundation of traditional search ranking.