Dissonance is the quality in Western music of certain simultaneous or successive combinations of notes seeming harsh or unpleasant and seeming to have a need to resolve to a stable consonance. Although usually applied to harmony, chords, and intervals, by extension both it and consonance can also be applied to melody, tonality, and even rhythm.
Dissonance is a matter of degree, as some combinations of notes can sound more dissonant or more consonant than others. The most dissonant interval is the natural seventh. It is also a matter of conditioning or culture, because some combinations that seem dissonant and, thus, to be avoided, in one era or culture might seem less so in another.
Although dissonance can be described as being harsh or unpleasant, there is nothing necessarily bad about it. It is not always something to be avoided, and, in fact, it can be extremely useful for such things as adding color and emotion to music and accentuating consonance. Dissonance has always existed in Western music, but the past several hundred years have seen its increasing use.