A theoretical approach first proposed in 1957 by L. Festinger, the cognitive dissonance theory argues that all humans, in principle, seek to align their beliefs with their actions, and vice-versa. This occurs because our needs for closure, self-reliance, and validation lead us to act upon what we believe and defend it as part of our personality.
However, when we act against our own beliefs we become dissonant, that is, inconsistent with either our actions or beliefs. Hence, two things may happen: a) either we admit that we are contradicting our principles and that we are not perfect or, b) we try to atone for our actions by finding excuses, or creating false beliefs, in order to help us justify what we do. It is defined as
the feeling of psychological discomfort produced by the combined presence of two thoughts that do not follow from one another. Festinger proposed that the greater the discomfort, the greater the desire to reduce the dissonance of the two cognitive elements” (Harmon-Jones & Mills, 1999)
According to Festinger, the discomfort produced by this behavior leads to maladaptation and may create either trauma or other types of anti-social behaviors.
Therefore, the context of dissonance is used to describe behaviors that go against what the individual has established to be his or her own standards of discipline, behavior, or lifestyle. A way to use the terminology within a context would be:
A very religious person may experience cognitive dissonance when he or she drinks at a party after preaching against social drinking. As a result, the said individual will find excuses to justify that feeling of dissonance by excusing his actions under a pretext. If the dissonance is too intense, the result may be that the said person will cease drinking socially or will never do it again after that.