IR A + INFINITIVE is one of the ways we have to express future in Spanish. We use the future tense to talk about something that is going to happen or something you want to do or are going to do in the future. In Spanish, just as in English, there are different ways of expressing future: one is the future tense or FUTURO SIMPLE, other is what we call EL FUTURO INMEDIATO the near future or the future for plans.
El FUTURO INMEDITO is like the English I am going to …, e.g. I am going to go, He is going to play, and is made up of the present tense of IR (to go) + a + the infinitive of the main verb:
Voy a salir (I am going to go out).
Vamos a comprar una casa (we are going to buy a house).
Va a llover (It is going to rain).
This is the most useful future tense to learn, as it is the one used most frequently in conversation when talking about the near future: esta noche (this evening), mañana (tomorrow), muy pronto (quite soon)… or when you would use “going to” in English.
But be careful not to mistake the near future with the present progressive:
Voy a comer una ensalada (I am going to eat a salad).
Estoy comiendo una ensalada (I am eating a salad).