Both translate to "times", but they have very different meanings.
The word פעמים refers to repetitions. So for example: I visited the US five times in the last ten years. ביקרתי בארה״ב חמש פעמים בעשר השנים האחרונות
It is the plural of the word פעם meaning once.
On the other hand, עיתים refers to actual time, as in the fourth dimension. It is the plural of the word עת, which is a synonym for זמן - time. You don't use the plural form much, except in some Talmudic thing about לקבוע עיתים לתורה (setting time to study the Torah).
Although these are distinct words, add a ל before them and they become synonyms. לעיתים = לפעמים = sometimes.