When we say cognitive dissonance theory it refers to a situation in which, it involves attitudes, belief and behavior. So this theory is producing mental discomfort to a situation. The discomfort which leads to an alteration in one of the attitudes, beliefs or behaviors to reduce the discomfort of a thing.
Example, we all know that people are very addictive in such doing even if it’s bad. Like smoking or using drugs, they know that it is very bad for themselves but continue doing it. And that bad effect to his/her health there is the possibility to reduce it’s bad behavior by not doing it again because of convincing behavior on his/her mind.