In traditional programming, a human writes every rule. In machine learning, you instead feed the computer many examples and let it work out the rules itself by finding patterns in the data.
The more high-quality data it sees, the better it gets. A spam filter, for instance, learns from millions of emails labelled spam or not-spam, then applies what it learned to new messages it has never seen.
Machine learning powers recommendations, fraud detection, voice recognition and much more. Modern breakthroughs like large language models are built on a form of machine learning that uses neural networks trained on enormous datasets.