Supervised learning
The model is trained on labeled input-output pairs and judged by how well it predicts labels for new inputs. Predicting a category is classification; predicting a number is regression.
Example
Given 5,000 emails each tagged "spam" or "not spam", a classifier learns which words predict the tag and then labels new, untagged emails.