In a traditional program a person writes down the rule: "if the amount is over fifty thousand, ask for approval". In machine learning you hand over a lot of examples instead — approved and rejected cases — and the system produces the rule itself. That pays off when the rule is too complicated or too changeable to write down.
The three terms — AI, machine learning, generative AI — are not synonyms and not rivals: they nest inside one another. Machine learning is one branch of AI, and today's generative models are a kind of deep learning inside machine learning. Once you know which sits inside which, half of the technical press suddenly becomes readable.
The most common misconception is that machine learning is new. It is not — it has been working for decades, and the current boom did not come from a new idea but from there being enough data and cheap enough computing for it. That makes a useful filter, by the way: when someone announces a "revolutionary new approach", it is worth asking what suddenly became affordable.
How the three levels relate is the subject of Machine Learning, Deep Learning, Generative AI: How They Fit Together, a post of its own. Directly related terms: deep learning, training and neural network.