If you are working on Ubuntu follow these steps:
Step 1:
First update your system.
$ sudo apt-get update
Step 2:
Then install docker if you already haven't.
$ sudo apt-get install -y docker.io
Step 3:
then download docker compose
$ sudo curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o/usr/local/bin/docker-compose
Step 4:
given docker the appropriate permissions.
$ sudo chmod +x /usr/local/bin/docker-compose
Step 5;
Now check if it is installed or not using this command:
$ docker-compose --version
Hope that helped :)
Looking for more in depth knowledge about docker compose, try docker training course, you will be taught a lot different concepts pertaining to docker compose.