At a high level, AI is a very general field, with the abstract definition of "making computers do smart things". The exact scope of this is up to interpretation! For example, would you consider a backtracking maze-solver "smart enough" to be AI? Some people would, and others would not! AI encompases the following topics (among others):
Natural Language Processing (NLP)
Computer Vision (CV)
Machine Learning is a subset of AI, consisting of a specific approach to solving AI-related problems, usually with lots of data ("big data").
In the 1970s and 1980s, AI researchers tried to create programs that would think like a brain does. The problem was that we don't really know how the brain works, so this was (and is currently) impossible. So, instead of focusing on how it works, many shifted to focusing solely on the results of the data, creating the field of ML. Machine Learning is good at finding correlation in the data, but the task of attributing causation is a much harder task that is done instead by humans.
Machine Learning algorithms aren't inherently smart! It's often up to the humans who write them to ensure that they work as desired.