Reaction formation is a psychological defense mechanism where an individual unconsciously replaces an unacceptable impulse or desire with its opposite. It involves the transformation of a threatening or unacceptable thought, feeling, or behavior into its polar opposite as a means of coping with the original impulse.