The artificial intelligence vs machine learning divide comes down to the goals that each technique is trying to achieve. Artifical intelligence (AI) attempts to recreate human cognitive abilities such as consciousness and creativity in a machine. Machine Learning (ML) on the other hand aims to enable human decision making abilities by analysing vast amounts of data and identifying certain patterns within it.
ML algorithms work by examining an environment (represented by specific data points and certain constraints or rules) to provide decision making capabilities to a machine. In a sense, ML operates as part of the ‘mind’ of an AI system.
For instance, if AI is like a human then it should be able to do the things that a human can do – such as driving a car. To do this effectively the ML component might learn to identify road markings, signs, other cars, pedestrians (data) and so on and take specific actions (rules and constraints) when they recognize them