The Naive Bayes algorithm is very popular for text classification because low computational cost and memory requirements facilitate training on very large, high-dimensional datasets. Its predictive performance can compete with more complex models, provides a good baseline, and is best known for successful spam detection.
The model relies on Bayes' theorem (see Chapter 9, Bayesian Machine Learning) and the assumption that the various features are independent of each other given the outcome class. In other words, for a given outcome, knowing the value of one feature (such as the presence of a token in a document) does not provide any information about the value of another feature.