The first "a" is needed as part of an often-used construction ir + a + infinitive.
Voy a estudiar. I'm going to study.
Van a comer. They're going to eat.
Ir is one of several verbs that requires an "a" before a following infinitive.
(Some others are venir a, aprender a, enseñar a, empezar a, comenzar a,).