What is machine learning, in terms of the problem it solves
The textbook definition is that machine learning is software that improves at a task by learning from data rather than by being explicitly programmed, which is accurate and not much use on a Tuesday morning.
Here is the version you can act on. In ordinary software, a person works out the rule and writes it down. In machine learning, you supply many examples of a situation and its outcome, and a program works out the rule for itself.
That is the whole difference, and it explains everything downstream. It explains why machine learning needs so much data, because the examples are the specification. It explains why the results are probabilities rather than certainties, because a rule inferred from examples is a good guess rather than a proof. And it explains why nobody can fully explain the rule afterwards, because no person wrote it.
The one question that tells you if it is a machine learning problem
Ask this: could a competent person write down the rule?
If yes, write the rule. It will be cheaper to build, faster to run, easier to test and possible to explain to an auditor. Flag any transaction over ten thousand from a new account is a rule. Do not train a model for it.
If no, and the reason is that the pattern is real but too tangled to describe, that is a machine learning problem. An experienced fraud analyst who says I can tell when something is off, but I could not write you the rule is describing exactly the condition machine learning exists for.
There is a third answer, and it is the most common one in practice. No, because we do not know what happened afterwards. If you have no record of which transactions turned out to be fraudulent, there is nothing to learn from, and the first project is a data project rather than a model.
Machine learning vs AI: what people mean now
This has become genuinely confusing, and the confusion costs real money because the two lead to different projects.
Artificial intelligence is the broad field. Machine learning is one approach within it, and the dominant one for decades.
Machine learning trains a model on your data to do one narrow thing well. It predicts which customers will leave, sorts invoices into categories, or spots the unusual reading in a stream of sensor data. It knows nothing except what your data taught it.
The AI most people now mean is a large language model or an image model, trained by somebody else on an enormous general corpus. You do not train it; you describe what you want and it responds. It is broad, immediately available, and it knows nothing specific about your business.
The practical difference is where the knowledge lives. A trained model holds your patterns and cannot do anything else. A general model holds the world's patterns and knows nothing about you until you tell it.
So the choice is not which is better. Which of our customers will cancel next month needs a model trained on your customer history; no general model can answer it. Summarise this contract needs a general model; training your own would be absurd. Many real systems use both, and a team that treats them as one thing will build the wrong one.
Types of machine learning, and when each applies
Three families, and the difference is what you can give the model to learn from.
Supervised learning learns from examples where you already know the answer, such as ten thousand emails each marked spam or not spam. It is the most common type in business, it is the most reliable, and it needs labelled data, which is where the cost hides.
Unsupervised learning finds structure without being told what to look for. Give it your customers and it groups similar ones together, without knowing what the groups mean. Useful when you suspect there is a pattern but cannot name it. The output needs a human to interpret, and that step is often skipped.
Reinforcement learning learns by trying things and seeing what works, and it is powerful in games, robotics and control systems. Rarely the right first choice in business software, because it needs an environment safe to experiment in, and most business decisions are not.
For most organisations the honest answer is supervised learning, on data you already hold, for a decision you already make. That is unglamorous, and it is where nearly all the value is.