An example of synonyms, which can never occur singly because each synonym must refer to another word, are the words cat and feline (as a noun). Each describes any member of the family Felidae. Similarly, if we talk about a long time or an extended time, long and extended become synonyms.
However, different words similar in meaning usually differ for a reason, feline is more formal than cat; long and extended are only synonyms in one usage and not in others, such as a long arm and an extended arm.
The purpose of a thesaurus is to offer the user a listing of similar or related words; these are often, but not always, synonyms. See hyponym for a closely related phenomenon, "words included in other words", as tulip is included by flower, but not vice-versa.
In contrast, antonyms (an opposite pair) would be:
Homonyms are words that sound alike and can even be spelled the same but mean different things, such as to, too and two, or they're, there and their, or, fluke, fluke, and fluke. See article.