Dissonance has several meanings, all related to incongruity:
Consonance and dissonance in music are properties of an interval or chord
Cognitive dissonance is a state of mental conflict.
Dissonance in poetry is the deliberate avoidance of assonance, i.e. patterns of repeated vowel sounds. Dissonance in poetry is similar to cacophony and the opposite of euphony.