Docker is a software which is used for virtualization and much efficient as compare to virtual machine. Docker works in the form of containers. You can envision container as virtual machine but it is very efficient and lite weight compare to virtual machine. Docker uses host machine OS kernal and minimal required feature of user space in its container. While in case of virtual machine you have to create a virtual machine and have to install operating system separately on it.
Now you can envision, How much docker based virtualization would be efficient compare to the virtual machine based.
To run docker based system, first you have to create images (set of software libraries which are needed to run binary). How an image is created you can learn from Docker File. Once the image is built, it can be run in a container.
Please refer following link to learn basis commands and its uses in docker based environment: