The word octave comes from Medieval Latin octava, from Latin, feminine of octavus eighth, from octo "eight," and refers to the difference in sound between the first and eighth notes on a musical scale, thus indicating that the eighth note repeats the first, but higher or lower. To symbolize this, humanity has long used a scale to represent the steps between the first and eighth notes:
The first and last DO are an octave apart, and they sound very similar, almost like the same note, except that the top note is higher because it vibrates twice as fast, while lower octaves vibrate at half the speed, thus sounding lower.
This musical example illustrates a law that functions throughout nature, from the microcosmic level to the macrocosmic level.
"While making a list of the elements in the ascending order of their atomic weights, John A. Newlands discovered at every eighth element a distinct repetition of properties. This discovery is known as the law of octaves in modern chemistry." — Manly P. Hall
While the seven-note scale is very ancient and its origins unknown by modern humanity, the names DO-RE-MI were invented in the eleventh century. The names were taken from the first verse of the Latin hymn Ut queant laxis (8th century):
Ut queant laxīs resonāre fībrīs
Mīra gestõrum famulī tuõrum,
Solve pollūtī labiī reātum,
"So that these your servants can, with all their voice, sing your wonderful feats, clean the blemish of our spotted lips, O Saint John!"
In the 1600s "Ut" was changed to DO.