Task learning is the process by which a machine learning model acquires a new skill, rule, or input-output mapping at inference time directly from demonstration examples, without modifying its underlying parameters. In the context of in-context learning within large language models, task learning occurs when the model dynamically infers novel patterns or mappings presented in a prompt rather than merely retrieving previously memorized concepts. This mechanism contrasts with task retrieval, where the model simply identifies and activates a relevant skill that was already acquired during pretraining. As additional demonstration samples are provided, task learning allows the model to progressively refine its understanding of the new task, improving its ability to generalize and make accurate predictions on unseen queries.