A colon follows a clause that introduces something: a list or explanation or restatement or illustration:
They served authentic cobra foods at dinner: mice in garlic sauce, venom pancakes, and sautéed mongoose.
We tried to make him comfortable: we scattered peanuts in every room and played circus music.
Living in an unpunctuated environment can be dangerous: for instance, your clauses can fall down.
The rule is that a complete clause must precede the colon. If the material that follows the colon is part of the structure of the clause that precedes it, a colon isn’t correct:
ERROR: We asked him: to stop tickling the lion tamer. [The colon isn’t correct: to stop tickling is a completer of asked.]
ERROR: His best friends were: Pestilence, War, Famine, and Fang. [The colon needs to be removed: Pestilence, War, Famine, and Fang are completers of the finite verb were.]