Docker is used to packing and shipping the programs to another computing environment using containers. It helps another person to need not replicate the same environment as the developer of the application.
For example, a developer has built a web application using PHP in a particular OS and used particular libraries to integrate with SQL. After building an application, the developer sends it for testing. Tester has to recreate the environment using the same version of PHP and the same libraries. It would be difficult to do recreate the same environment and could face problems many times. We can use Vms for this but Vms occupy large space. So, Docker is better than Vm because of its light-weight and more efficient.
I would suggest you enroll in this Docker Training Course if you are interested to learn more about Docker.
You can watch this video to learn more about Docker: