Docker is a tool that makes creating containers easy, but what is a container you ask?
In the past every service (e.g. a Web server) run on its own server (bare-metal). Heaving one server per service is as you can imagine not very efficient, so people start running many services on the same server in parallel. However, that had is problematic as well, because one bad behaving service could affect all the others.
Next virtual servers (aka virtual machines) came to be. Virtual machines enabled us to isolated the workloads from each other and run multiple things in parallel on the same hardware. This was much better then the initial state but it still wasn’t very efficient. Each VM was running a whole operating system running, plus it was not every fast to create and start a VM.
The next step was to create an isolation layer inside the operating system that would separate different services so that they wouldn’t interfere with each other and don’t require the whole stack of a VM. This technology was called containers. However, it was quite cumbersome to create a container until Docker came around and built easy to use tooling which enabled everybody to create a container - and the rest is history!