Docker is a computer program that performs operating-system-level virtualization known as containerization. It allows independent "containers" to run within a single Linux instance, avoiding the overhead of starting and maintaining virtual machines. Docker consists of images, registries, and containers. It works by downloading an image, creating a container, initializing the file system and network, setting up the IP address, and starting the specified process.