Machine learning is used to optimize a model based on examples when human expertise is limited, changes over time, or needs to be adapted to specific cases. It involves using statistics to infer patterns from data in order to build models that generalize beyond the training examples. Common applications include classification, regression, clustering, and reinforcement learning. Resources for machine learning include datasets, journals, and conferences in the field.