What comes in your mind when you hear this term - AI? Machines doing things like humans, or are even replacing humans. Do T-800 from terminator comes in your mind or Jarvis from Iron-Man? Well, yeah we can say it's an artificial intelligence but in reality, we are still very far from achieving T-800 like high level robot who is good in almost every task.
An AI is a machine that acts like humans, it can be just software based or if blended with robotics then it can make a completely different masterpiece like Sophia -a humanoid robot. But there is something called Narrow AI- means machines can do things like humans or better than humans at some specific sites like detecting cancer, playing video games but only some specific tasks, they can't do other stuffs. There is General AI and these are machine that can do all things like humans instead of just one specific thing. See when we talk about AI, we generally are talking about Narrow AI as we are still very far from General AI. Google assistance, Siri, Alexa and many other are examples of this Narrow AI.
But how we actually do it, I mean teaching machines so that they can do some work. This is done by machine learning. Many students just consider AI and ML as same but ML is a subset of AI & is an approach to try and achieve AI through systems that can find patterns in a set of data. It's getting machines to do things by providing a set of training data and then after training it, we test it using test data and then can work on real world data with it's help.
But again how we implement ML, how that much data is gathered? Well, it's not that much of a hard task for big giants like Google, Amazon, Facebook and others. They on daily basis collects a lot of user data from all over the world and hence, they are pioneers in AI and ML world. There a lot to learn in the world of machines. And if I go on writing then even a book can be written. But even I am learner who is giving you the overview of AI.
At last, the thing is that - AI and ML overlaps. ML is a step towards an AI. More preciously data science, deep learning, machine learning and artificial intelligence, these all are overlapping terms. One needs other to completely leverage its power.