This is going to be a relatively short post, because vowel harmony isn’t all that complicated — it just takes some practice to get right. The basic principle is that there are certain pairs of vowels that can’t co-occur in a word, although simply stating it that way misses a couple of important nuances. For now, let’s take a different tack.
Finnish has eight vowels: i e a o u ä ö y. Vowel harmony would be slightly easier to explain if the vowel represented by y were written as ü (as it is in Estonian), but it’s a bit late for that. Now, the first rule of vowel harmony in Finnish is this: if a word contains a vowel with an umlaut on it (ä, ö) or y, all other instances of a and o in that word must have an umlaut on them (and be pronounced accordingly), and u is not allowed (it gets replaced by y if it showed up in a suffix).
The corollary to this rule is that if a word contains a, o or u (without umlauts), no other vowel is allowed to have an umlaut on it, and y is not allowed in the word. In both cases, suffixes adjust their internal vowels (getting either a, o, or u or ä, ö or y) depending on the vowels that are already present in the stem.
Finally, these rules come with one caveat: a word is more or less defined as a single word stem with its attached suffixes, not as a word written on paper. In compound words, you may see sequences of vowels that violate vowel harmony, because they are technically in separate words that have only recently been jammed together. The word yläosa ‘upper part’, for instance, is perfectly fine in Finnish because it’s a compound.