How machines learn
Classification is a machine learning task where the model sorts each input into one of a fixed set of categories, such as spam or not spam.
Classification answers 'which kind is this?' The categories are decided before training: cat or dog, positive or negative review, one of ten digits. The model looks at an input and picks the most likely category. Often it also gives a confidence score for each option, so you can see how sure it is.
Training uses labeled examples, so classification is a form of supervised learning. The model learns which features tend to go with which category. A simple classifier might separate two groups with one straight line; a deep network can draw extremely complicated boundaries.
The number of categories can be two or thousands. Photo tagging picks from thousands of objects. Medical screening often uses two: healthy or needs review. Whether a classifier is 'good' depends on how it is measured, and accuracy alone can hide serious problems on rare categories.
Your inbox sorting mail into Primary, Promotions, and Social is a classifier assigning each message to one of three categories.