TL;DRNaive Bayes classifies using probability and a "naive" independence assumption — fast and surprisingly good for text.
It applies Bayes' theorem assuming features are independent given the class (the "naive" part — usually false, yet it works). Compute the probability of each class given the features and pick the highest. It's extremely fast, needs little data, and is a classic strong baseline for spam filtering and text classification despite its simplistic assumption.