A label answers the task's question
How prediction targets and annotations make tabular, time-series, image, and text examples labeled for a particular task, independently of whether the data is structured or unstructured. · foundational
A machine learning task defines what a model should predict. The information given to the model is its input; the answer it is meant to predict is the prediction target. In supervised learning, training examples include known targets so the model can learn relationships between inputs and answers.
A label supplies that task-specific answer. For a support-ticket classifier, the input is ticket text and the label could be billing or technical support. For a house-price model, the label is a numeric sale price. Labels are not limited to categories.
To recognize a label, ask: Does this information provide the answer the model should learn to predict? A filename, record identifier, or column heading is not automatically a label just because it describes the data.