Could you guide us through the Naive Bayes algorithm and the basis for setting its classification threshold?

Free for the first 3 answer contributors

Interview question asked to Machine Learning Engineers interviewing at Nuro, Mozilla, Whatsapp and others: Could you guide us through the Naive Bayes algorithm and the basis for setting its classification threshold?.