This refers to the repetitive performance of certain behaviours despite negative consequences or when such actions are inappropriate for the situation. Individuals experiencing compulsions are often aware that the behaviours are harmful or unnecessary, yet feel a strong emotional urge to carry them out to relieve stress, tension, or anxiety.
Sources: SAMHSA_NCBI