Machine learning is a technique where computers learn from data to improve their abilities without being explicitly programmed. It works by building models from historical data to make predictions on new data. The accuracy of predictions depends on the amount of data used to build the model. There are three main types of machine learning: supervised learning which uses labeled training data, unsupervised learning which learns without labels, and reinforcement learning where an agent learns from rewards and penalties.