Artificial Intelligence (AI) is the ability of a computer system to mimic human cognitive abilities, while Machine Learning (ML) is a subset of AI that focuses on algorithms and statistical models to assist machines in learning autonomously.