A container is a typical unit of software packaged with dependencies allowing for quick and dependable deployment of programs across several computing platforms. Containers can run natively on Linux and Windows.
Docker can be imagined as a large ship (docker) transporting massive boxes of products (containers).
Docker containers do not require the installation of a separate operating system. Docker simply relies on the kernel's resources and functionality to allocate them for the CPU and memory. It does so by using resource isolation for CPU and memory, as well as different namespaces to segregate the application's view of the OS.