Contrary motion is a musical term that refers to the movement of two or more voices or lines in opposite directions. This concept is essential in creating harmonic textures and maintaining balance within musical phrases, especially in voice leading and the formation of cadences.