The answer below is on point apart from one thing. The installation of docker has becoming easier in the past year.
Head over to the official Docker website, click on the 'Get Docker' button and select your system's docker app be it desktop (mac or Windows), cloud providers or servers (Ubuntu falls in this category).
Install the docker app and run it. To confirm that all's good running:
docker
should list help information for docker.
You can now proceed to fetching an image from the Hub section in the previous answer.