Machine learning is a subset of artificial intelligence (AI) that involves training algorithms to recognize patterns and make predictions from data. Unlike traditional programming, where specific instructions are given to achieve a result, ML models learn from data inputs to improve their performance over time.