Plan to depart from either the Dublin Connolly train station or the Dublin Heuston train station to take an Intercity train to Ballina.
Be prepared to board the Bus/Luas to get to the Dublin Heuston station if starting out from or near the Dublin Connolly station.
Book your train travel reservations online at the Irish Rail Web site to travel from Dublin Heuston to Ballina (see Resources).
Note that most train routes include 2 connections, the first at the Westport train station and the second at Manulla Junction.
Realize that total travel time from Dublin to Ballina is from 4 to 5 hours.