There are two main classes in German verb conjugation: Strong verbs are verbs that form their past tense with ablaut (singen - sang - gesungen); weak verbs are verbs that form their past tense with a dental suffix (leben - lebte - gelebt).
The phenomenon that you describe (vowel change in present singular) is primarily one that occurs in strong verb conjugation. It can be explained by looking at the verb endings of Old High German strong verbs in present tense:
1st person singular: ih wirfu
2nd person singular: dû wirfis
3rd person singular: er wirfit
1st person plural: wir werfemês/werfên
2nd person plural: ir werfet
3rd person plural: sie werfent
As you can see, the OHG present tense endings in singular for strong verbs are -u/-is/-it. Now, we can distinguish two sub-phenomena:
e/i change: In this case the vowel preceding the ending is e as seen in werf-. The vowels u and i of the ending are close vowels. They "pull" the preceding vowel e up (assimilation). If you move along the "Vokaltrapez"/vowel trapecium starting at e moving towards the close vowels you end up at i. That's why the singular forms have an i and not an e.
In later times, the 1st person singular moved back to the e sound. Additionally, the verb endings got simplified a bit but their influence on the preceding vowel remained. So, today we have:
1st person singular: ich werfe
2nd person singular: du wirfst
3rd person singular: er wirft
1st person plural: wir werfen
2nd person plural: ihr werft
3rd person plural: sie werfen
Umlaut: The second sub-phenomenon is umlaut in 2nd and 3rd person singular. The sound i of the verb ending is a front vowel. If it is preceded by a non-front vowel like a, o or au this vowel is fronted by assimilation. An a getting fronted is an ä (fahren - du fährst), an o getting fronted is an ö (stoßen - du stößt) and an au getting fronted is an äu (saufen - du säufst). The u of the 1st person ending does not yield a fronting. Thus the conjugation of (present-day) fahren is
1st person singular: ich fahre
2nd person singular: du fährst
3rd person singular: er fährt
1st person plural: wir fahren
2nd person plural: ihr fahrt
3rd person plural: sie fahren
- These two phenomena are not found regularly with weak verbs because (in simple terms) weak verbs had different verb endings than strong verbs.
- Sometimes the i of e/i change becomes a long one that is written ie (lesen - du liest)
- Sometimes the e of e/i change has become an ä or ö (gebären - du gebierst; erlöschen - du erlischst)
- Sometimes there is no umlaut to avoid an ambiguity (saugen - du saugst instead of du säugst since there is a verb säugen).
To answer your question about how to know which verbs show this phenomenon: If you know that a verb is a strong one, then you can assume that there is e/i change or umlaut in 2nd/3rd person singular. You have only to learn by heart those cases where something unexpected happens.