Shell interview question

How Naive Bayes algorithm works