Inference, estimation, and decision-making from data
There are two fundamentally different ways to build a classifier, and the split runs through all of machine learning. A discriminative model learns the boundary between classes directly. A generative model learns how each class generates its data, and derives the boundary as a by-product.
Formally: a discriminative model estimates the conditional p(y|x) directly, answering "given these features, which label?" A generative model estimates the joint p(x, y) (often via p(x|y) and p(y)), then uses Bayes' rule to get p(y|x).
Think of two art students. One learns to paint a cat from scratch, mastering how fur, whiskers, and ears come together: that's a generative model, learning how each class produces its data. The other never paints anything but becomes brilliant at spotting a cat versus a dog in any photo: that's a discriminative model, learning only the boundary between classes. The painter can create new cats; the spotter just draws the line, and is often sharper at it.