Compare the English vs. the Spanish infinitive verbs.
The English infinitive verbs follow the same pattern: TO + VERB, for instance: to speak, to eat, to live...
The Spanish infinitive verbs, on the other hand, follow into 3 categories. They can either end in AR, ER, or IR.
For example: hablar - to speak, comer - to understand, vivir - to live.