There are many rules about endings. For example:
Plural MASCULINE nouns, adjectives, pronouns ending in /i/ are spelled with οι (δρόμοι, καλοί, αυτοί).
Singular FEMININE nouns, adjectives, and pronouns ending in /i/ are spelled with η (λύση, καλή, αυτή).
Singular NEUTRAL nouns ending in /i/ are spelled with ι (παιδί, αυτί/αφτί).
The /o/ sound in the last syllable of nouns, adjectives and pronouns spelled with a ο (δρόμος, βιβλίο, καλός, καλό, αυτός, αυτό).
Active voice verbs end in -ω.
But in other cases, when the vowel is in the middle of the word there are no rules. You learn one root and then you know how to spell the whole family.
It's all because η, ει, ι, οι and ω, ο used to be pronounced differently in ancient greek. As the language evolved, the phonetics simplified, making some letters sound the same, but writing kept the old distinctions based on etymology. Yes, there are these rules, but I know many native Greeks who have to look in the dictionary when they need to write an essay.
Yes, Greek has HISTORICAL ORTHOGRAPHY (ιστορική ορθογραφία). Except for _Dimitris' rules you must know ancient Greek in order to understand why a word is written as it is written. (I had to check the second ι in ιστορικός for instance)
Dimitris what I know the Greeks did not learn modern Greek in school before 1976. No wonder that the generations before that have difficulties in orthography.
After reading all the comments relative to she (η) and they (οι), I haven't found a better way to pick the correct answer to the audible question than flipping a coin! Ambiguous sounding questions are not helpful to the beginner and should only be used in the visual context. Titus