The physics of sound waves determines whether certain pitches are consonant (pleasant-sounding when played together) or dissonant ("clashing" when played together). The octave is the most basic consonant interval, wherein the frequency of one of the pitches is exactly double that of the other.
Modern Western music divides the octave into twelve tones of equal temperament--that is, equidistant from each other. Dividing the octave into twelve tones produces seven consonant intervals: the octave, fifth, fourth, major and minor thirds, and major and minor sixths.
The basic types of scales used in modern Western music are the major and minor modes, which each contain seven pitches chosen from the twelve tones. The minor mode is usually associated with sad or serious music.
Many other types of scales can be created using twelve tones. The chromatic scale, which utilizes all twelve tones, is the basis for twelve-tone music. The pentatonic scale, which uses five notes (do-re-mi-so-la), has a sound commonly associated with Asian music.
The music of some cultures divides the octave into even smaller intervals, which in Western music are sometimes called "quarter tones." For example, some Indonesian music divides the octave into 31 equal-tempered pitches.