The terms Artificial Intelligence (AI), Machine Learning (ML), and Deep Learning (DL) are used interchangeably. That can make the field confusing for beginners.
The simplest way to think about them is:
AI is the broad goal.
Machine learning is one way to build AI.
Deep learning is one branch of machine learning.
AI: the broad goal
Artificial intelligence is the broad field of building systems that can perform tasks associated with human intelligence: reasoning, recognizing patterns, understanding language, making decisions, or solving problems.
Not all AI is machine learning. Some AI systems can be rule-based, where humans explicitly write the logic.
Machine Learning: learning from data
Machine learning is a subset of AI.
Instead of programming every rule by hand, we train a model on data so it can make predictions, classify things, or generate outputs.
A normal program follows explicit instructions. A machine learning model learns patterns from examples.
Deep Learning: neural networks at scale
Deep learning is a subset of machine learning.
It uses multi-layer neural networks to learn patterns from large amounts of data. This is the approach behind many modern AI systems, including computer vision, speech recognition, and large language models.
The relationship
The relationship is nested: deep learning sits inside machine learning, and machine learning sits inside artificial intelligence.

The hierarchy looks like this:
AI contains machine learning.
Machine learning contains deep learning.
So:
All deep learning is machine learning.
Deep learning systems are usually built for AI tasks.
But not all machine learning is deep learning.
And not all AI is machine learning.
Simple examples
A rule-based chatbot can be AI without machine learning.
A spam classifier can be machine learning without deep learning.
A large language model is deep learning.
My takeaway
The distinction matters because these terms describe different levels of the system.
AI describes the goal.
Machine learning describes a method.
Deep learning describes a specific family of methods using neural networks.
Next, I'm going deeper into neural networks, because they are the foundation behind modern deep learning.
References
Google, "Introduction to Machine Learning" https://developers.google.com/machine-learning/intro-to-ml
IBM, "AI vs. Machine Learning vs. Deep Learning vs. Neural Networks" https://www.ibm.com/think/topics/ai-vs-machine-learning-vs-deep-learning-vs-neural-networks
Google, "Machine Learning Crash Course" https://developers.google.com/machine-learning/crash-course
MIT 6.S191, "Introduction to Deep Learning" https://introtodeeplearning.com