Machine learning derives rules from examples instead of having a person write them. In ordinary programming you supply the logic and the data, and the computer returns answers. In machine learning you supply the data and the answers, and the computer works out the logic. That logic is a model, a set of numbers fitted to patterns in past examples.
The difference earns its cost when the rules are too messy to write down. Nobody can enumerate every way a photo can show a cat. But you can collect labeled photos and let training find the pattern for you.
What you give up is certainty. A hand-written rule fails in ways you can read in the source code. A model fails in ways you have to measure. You also sign up for data collection, labeling, and retraining as the world shifts.
Rewriting in plainer words…
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.