When you hear thunder, it is natural to think that there might be a storm on the way. Thunder is a natural sign of a storm.
A period (full stop) is a conventional sign to indicate the end of a sentence. The Swiss linguist Ferdinand de Saussure suggested that language is made up of signs; written or spoken words (graphemes and phonemes) are signs that cause objects or concepts to appear, as if by magic, in our minds. Ogden and Richards suggested a triangle of meaning as a model of how linguistic symbols are related to the objects they represent.
Code is a system to convert information, such as a letter, word, sound, image, or gesture into another form. Language is an early example of a code; early humans worked out ways to signify thoughts by way of speech sounds. By using language, one person could make thoughts appear in the head of another person! Later, they figured out how to represent these speech sounds in written form; letters or pictures were used as a code to represent the words. So the written form converted to the speech form which converted to thoughts in the head. The process of encoding converts information from a source (for example, a thought) into a different sign or set of signs (for example, a spoken word). The process of decoding converts signs back to something that the receiver understands.
Semaphore is a code system in which different flag positions and combinations signify letters or numbers. Morse code uses long and short signals. Shorthand uses written signs that can be written more quickly than ordinary writing. Computer code uses a system that converts signs into some form that gets a response from a computer.
Sometimes, meaning can be hidden by using code. In the movie Monsters Inc., Mike speaks to Sully in Pig Latin; he says “Ooklay in the agbay!” Pig Latin is a simple code that moves the first consonant of a word to the end of the word and adds an “-ay” sound. “Ooklay in the agbay!” just means “Look in the bag!”
Certain slang forms use special code, often to hide meaning from outsiders. An example of this is Cockney rhyming slang which originated in the East End of London. Cockney rhyming slang replaces a common word with a rhyming phrase of two or three words. Usually, the rhyming word is then dropped to make it more difficult for outsiders to understand.
The most common example is the expression “apples and pears,” which is code for the word “stairs.” You can say “I am going up the apples and pears” but people are more likely to say “I am going up the apples.” Another example is the phrase “elephant’s trunk” to mean “drunk.” So people might say something like “I was really elephant’s last night.”
Some Cockney rhyming slang forms are used in mainstream English. For example, the rhyming slang for “look” is “butcher’s hook.” It is quite common to hear people say things like “Have a butcher’s at this” even in non-slang speech.