Docker is a client-server application where Docker daemon is a server and the Docker command line interface is clients. Docker daemon is supported only on Linux but can be implemented on macOS and Windows also.
Docker client and Docker daemon run on the host operating system in general. Docker client can use REST API to connect to Docker daemon on host OS or to remote Docker daemon.
When a user sends commands, Docker CLI sends information to Docker daemon to manage and make changes to containers, images, and networks.
In case you are interested to learn more about Docker, I would suggest you take up this Docker Training Course.
You can watch this video to learn more about Docker ecosystem: