In linguistics, semantics is the study of how words convey meaning. A semantics theory attempts to account for the relationship between a word, or signifier, and the real-world object, idea, etc. that it describes, which is called the signified or denotata. There are two main categories of semantics theory: the formalist theory, which sees meaning as contained within language, and the cognitive theory, which sees meaning as contained within the language's context.
Theories of semantics attempts to resolve the difficulty that humans are capable of creating and understanding a virtually unlimited number of sentences, even those they have never heard before. Whereas most types of knowledge rely on memory, the mind is capable of understanding utterances that do not appear to be directly related to memory. For example, the mind is able to visualize the semantic content of the sentence "The giraffe brushes its teeth" without ever having seen a giraffe brush its teeth. This is known as the projection problem.
Formalist semantics theory, which was especially popular during the 1960s, defines semantics as linguistic description minus grammar; that is, a description of what language can communicate that does not directly deal with how sentences are formed. The primary semantic data, in this view, are content words — words that communicate something about the world outside of language — as opposed to function words, which convey grammatical information. Formalist semantics theory does, of course, recognize that the relationship between the signifier and the signified is arbitrary except in the case of onomatopoeia. On the other hand, this theory sees meaning as objectively contained within a coherent, cohesive system of language.
Contrarily, cognitive semantics theory postulates that grammar is actually a subset of semantics, rather than a separate study. According to this theory, the meaning of language is inseparably related to the hearer's memory and experiences. Even unique utterances are actually interpreted in the context of other memories, even though the precise meaning of the utterance is novel. For example, a person's ability to visualize "The giraffe brushes its teeth" is dependent on the person's having semantic categories based on past experience with each of its components — giraffe, brushing, and teeth. If the person does not have those categories, or if they do not match up precisely with another person's categories, the semantic content of the sentence is changed.
Either of these theories may take a truth-based approach to semantics; that is, it may evaluate the semantic content of a statement based on whether it is true or false. In formalist approaches, semantic content is judged "true" if it does not contradict other semantically true statements and therefore fits into a body of factual knowledge. In cognitive approaches, a statement can only be regarded as true if it can be observed to be so within its context.