All busses for public transport on Crete are KTEL busses. KTEL is a Greek organization of bus entrepreneurs (share holders) to which all regional bus companies are connected. The public transportation all over Greece is well organized as on Crete. A general rule however is to always check before making your arrangements to travel by bus -schedules in Crete can (and many times do) change unexpectedly. Double check (until the last minute) on public holidays (1 Jan, 25 Mar, 1 May, 15 Aug, 28 Oct, 25 Dec & of course Easter Sunday). The tickets are reasonably priced. In summer, it’s best to buy tickets the day before you will travel, be early at the bus station/stop for best chance of a (good) seat.

The larger towns have a central, covered bus station with waiting rooms, toilets and a snack bar. In smaller towns and villages that could be everywhere, maybe no more than a stop outside a kafeneion or tavern, which often doubles as a ticket office. Buy tickets at kiosks for local buses and at bus stations or local agent for longer trips. If not, or it is closed, you can buy your ticket on the bus.

The trip by bus from Heraklion Xanioporta busstation to Agia Galini will take approximately two hours and forty-five minutes, visa versa. 
Busses are available from early morning 05:30 hrs. until 23:00 hrs. late at night. More info concerning connections per region and time tables visit the KTEL website:
http://www.e-ktel.com/en/services/online-ticket-reservation

Heraklion has two busstations for different destinations. 

Station A is called Limni, Greek for “In the harbour”. The destinations are to the North-East:
Hersonissos, Malia, Archanes, Agios Niolaos, Sitia and Lassithi Plateau.
Local city-busses and those to Knossos are also at this busstation.

Station B, called Xanioporta is at the West-gate of the old town; at 62 Marters for the West & Southern destinations.
West & South-West: Rethymnon, Chania, Kastelli, Sfakia, Imbros, Anogia, Rogdia.
South: Agia-Varvara, Agii-Deka, Gortyn, Mires, Tymbaki, Phaestos, Matala & Agia Galini.

The busstation in Rethymnon is along the coast, west to the fortress. 
In Chania the busstation is left on upper Halidon street squaire, the busses to Souda depart from the main market.