On telephone lines with 4 wires there are usually green, red, yellow and black.
On my telephone line the green and red connect to one telephone jack with one on each side and the telephone jack is also color coded to make the correct connection.
Then if you need to connect a second telephone jack to a second telephone line coming into the house or building you would then use the yellow and black telephone wires.
The different colors just means they are different pairs to hook up to a telephone jack and the telephone jack will be color coded to match everything up.
For a single landline or DSL line you only need to connect two wires which is usually the green and red wire on the first telephone line.
Then on the second telephone line if you have on you'd use the yellow and black telephone line to connect together.
Telephone lines and DSL lines only require 2 wires to work and if you only have one telephone line or DSL line in the house or building then you can leave the other wires disconnected.