made use of a somewhat dizzying array of diacritic
marks to compliment the alphabet
. Most of these have been eliminated in the writing of modern Greek.
The most basic of these was the acute accent. On almost all polysyllabic words an accent was necessary. In Modern Greek it mostly just marks the portion of the word receiving stress, however it served a different purpose in Ancient Greek. It certainly marked a change in pitch (a bit like the tone systems used in Korean and Japanese, not as vital to the word as in Chinese or Thai). Scholars are fairly certain the acute accent marked a high pitch.
The second diacritic was the grave accent. In modern written Greek this is no longer used, and it was marked inconsistantly in Ancient Greek, although the Byzantines developed the most consistant of the usage systems. The grave accent probably indicated a level or falling pitch, although classicists are less sure about this one than they are about the acute.
The last pitch marker was the circumflex, which in Ancient Greek was usually curved instead of pointed. It indicated (probably) a high falling pitch. Thus, it could only be placed over a long vowel.
As vruba explained in more detail above, a twin pair of diacritics that fell only on the first or second letter of a word were the breathing marks. They are thought to derive from the two halves of the capital Greek letter 'H'. Related to this is the coronis. It marks the joining of two words whose vowels interlap, somewhat like the apostrophe marking the merge of the English words "we are" into "we're", but since Greek spelling was mostly phonetic, it goes directly over the new blended vowel sound.
The final diacretic mark used was a diaeresis, still in use in Modern Greek. Just like in other languages, and looking exactly the same too, the diaeresis (also called an umlaut) marks a vowel that is its own separate syllable from an adjoining vowel.
In terms of alignment (since multiple diacritics could fall on one letter), the breathings and coronis go under the circumflex and to the left of the acute or grave accents. The diaeresis always goes to the bottom. Accent marks on capital letters are written to the left of them, instead of on top.
Information sourced from Daniels, Peter T. Bright, William. The World's Writing Systems. Oxford: Oxford University Press, 1996.