You have to understand that there are 3 types of infinitive:
1st: -ar
2nd: -er
3rd: -ir
so you just have to study them and some examples, for example:
bailar: -ar (dance)
beber: -er (drink)
sentir: -ir (feel)
the verb ir is one of the most difficult verb because in spanish there are many different types of verb tenses and this verb changes in each one.
Ir is used as: to go
present: yo voy (i go)
past: yo fuí (i went)
future: iré (I'll go)
The past of this verb is just the same as to be in the past:
yo fui al zoo: i went to the zoo
yo fui el mejor: I was the best