At a very high level, Docker consists of following three major components:
- Docker Client
- Docker Host
- Docker Registry
Each component gets involved while launching Docker container.
Though, Docker client communicates to Docker host through command line interface or using docker compose, internally those CLI commands gets converted into REST API and Docker host serves these REST Requests.
Reference:
https://docs.docker.com/engine/api/#api-example