I'm looking at a set of data right and I'm a bit confused on how to tackle this. The data is showing a stem alternation of some verbs with [e] and [o] and no change in others. I know this is due to Latin and I've done some research on it but the answers I've found have left me confused. What rule makes a verb like "poder" conjugate with a stem change (puedo) but a similar verb such as "rentar" not (rento)? We're learning about abstract analysis right now and I'm quite sure that has something to do with it, but I don't know the steps to get there. Is there some sort of underlying vowel that never comes to surface that we can use in a rule? I've noticed that the dipthongization happens if the first syllable is stressed and has [e] or [o] but of course this doesn't apply everywhere, which is the problem. Thank you!
Classical Latin had a system of ten native vowels + two foreign vowels + two important diphthongs, for a total of twelve (a, ā, e, ē, i, ī, o, ō, u, ū, y, ȳ, æ, œ). This is quite a lot of vowels to keep straight; for later Romance speakers, it was too many.
In the precursor to Spanish (aka "Late Iberian Vulgar Latin", the Latin spoken in Spain right before it became not-Latin-any-more), this twelve-vowel system simplified to seven: a, e, i, o, u, ɛ, ɔ. (ɛ and ɔ are phonetic symbols; they were never actually written that way at the time. ɛ is the vowel in English "met", ɔ the vowel in "hot".)
a ← a, ā e ← ē, i, œ ɛ ← e, æ i ← ī, ȳ, y o ← ō, u ɔ ← o u ← ū
This change was nicely universal and predictable. Similar things happened in other vulgar Latin dialects, which would become the other Romance languages.
Then, the system simplified again. In unstressed syllables, or before syllable-final nasals, ɛ and ɔ turned into e and o.
e ← ɛ o ← ɔ
In any other places, they broke into diphthongs.
je ← ɛ (spelled "ie") we ← ɔ (spelled "ue")
For instance, Latin metus → Spanish miedo, Latin focus → Spanish fuego.
And this is the source of your mysteriously appearing diphthongs. When the first syllable is stressed, a historical /ɛ/ becomes /je/; when unstressed, it becomes /e/. Similarly, a historical /ɔ/ in a stressed syllable becomes /we/; in an unstressed syllable, /o/. But a historical /e/ or /o/ never changes its form, always remaining /e/ or /o/ regardless of stress.
Unfortunately there's no good way to predict where these ɛs and ɔs are, except by knowing the vowel lengths in the Latin words. So the best option for analysis is to take them as separate underlying phonemes, even though only these few remnants are visible now.
(See also guifa's comment on your question: what they call E² I call ɛ, and what they call O² I call ɔ. The "weirder things" they mention in the -ir conjugation come from a later process of vowel-raising, which I haven't gone into here; the first source link has some excellent information on that as well.)
The problem is that there are three classes of behavior, when only two make sense under normal assumptions about what the underlying segments of the language are. One pattern is the diphthongizing patterns of "be able" /pod/, where when stressed you get [we] as in [pwéðo] "I can". The second is the non-alternating pattern of "eat" /kom/ as in [kómo] "I eat". So far so good, yuo have a distinction between underlying diphthongs and underlying monophthongs, and diphthongs monophthongize when unstressed. But that can't be totally true, because of piedád "piety" where you do in fact have unstressed diphthongs. The abstract analysis "solves" the problem by saying that only specially-marked stressed vowels are diphthongized, so the unstressed diphthong of piedád is not a problem since the rule is that stressed vowels diphthongize, not that unstressed diphthongs monophthongize. There are basically two specific proposals for that special marking. One is that the special vowels are tense or long; the other is that they have an arbitrary diacritic [+D] (which is abstract since you can't hear it).
What seems to force some abstract analysis is this third class of vowels, exemplified by piedád: if only we could deal with unstressed diphthongs, the matter would be very simple – /pwed/ versus /kom/. As far as I know, the class of unstressed diphthongs is circumspect. There are prefixed stems like adiestrar, amueblar, and some nouns like piedad (also vienés), but to the best of my knowledge, no verb roots like puevár, pientér.
As an aside to all that's been said already: traditional Spanish grammar divides all verbs into three conjugation classes based on their endings (-ar, -er, -ir), but I've read (the source escapes me) that it would be more sensible to add three more for the stem-changing verbs discussed here, since there are so many.
Another aside: alternation of -e- and -i- based on the original Vulgar Latin vowel is of course not confined to Spanish. Italian has e → ie and o → uo, Romanian has e → e̯a and o → o̯a, etc. Neither French (which has fixed last-syllable stress) nor Portuguese have vowel alternation of this kind.