The colon ( : ) is a punctuation mark consisting of two equally sized dots centered on the same vertical line, and although it has many uses, the easiest way to look at it grammatically is that it is used when an explanation is given.
I designed all the exhibits: the red ones, the blue ones and the yellow ones.
The colon is used here because the information after the colon explains the word before the colon, so
exhibits = the red ones, the blue ones and the yellow ones.
The colon has primarily three grammatical uses and several non-grammatical uses.
Grammatically, it is used to join two parts of a sentence, when the second part explains or gives mor detail about the first. It is also used to intoduce a list, and finally it is used to emphasise an element in a sentence. Let's look at some examples,
Joining two parts of a sentence,
I can't go to the party because I have to work.
I can't go to the party: I have to work.
Introducing a list,
I have many kinds of friends: artists, traders, teachers, and legal professionals.
To emphasise something at the end of a sentence,
He knew bankrupty would be the result of his approach.
He knew what the result of his approach would be: bankrupty.
Here we are emphasising the word bankruptcy.
The colon is also used for non grammatical situations.
To express the time,
To define a ratio,
To specify a reference in the bible,
It can be used to separate the volume from page numbers of a cited work,
17:3238 (which means volume 17, pages 32 to 38.)
It can be used in letter writing,
Dear Mr. Lewis: = Dear Mr. lewis,
PS: I'll call later.