How are pushbacks coordinated between the pilot and the tug?
Generally speaking1, when an aircraft is allowed/ready to leave (deliberately not using the word depart) the gate, things proceed in the following fashion:


The pilots are in contact with Ground Control, and when the aircraft is ready to leave, Ground approves that they can leave the gate.
The pilots asks groundcrew that the pushback can start.
Pilots are in contact with a designated personal from groundcrew (see picture below).
Pushback tractor/tug will start moving the aircraft away from gates, onto the place where aircraft will be ready to move on its own.
During the pushback, aircraft's engines are started2.
Pilots inform tug driver/designated person from groundcrew which direction the aircraft needs to be facing at the conclusion of pushback.
When aircraft is ready to roll towards its assigned taxi instructions, marshaller signals the pilots that aircraft is in the requested position and pushback tug is about to be detached.
After the tug is disconnected, the designated groundcrew personal communicating with pilots, informs the pilots and disconnects his headset. The marshaller signals (after moving away from the aircraft) the pilots that the aircraft is ready to proceed on its taxi route.
Pilots confirm and acknowledge this last signal, and aircraft starts to taxi.




I have read that different airports have different procedures for the above mentioned activities. Although, I have always seen that a person from groundcrew attaches a headset near the nose gear of the aircraft (picture below) to communicate with the pilot.


Image Source
Please see the cable connecting the headset with the aircraft, near the nose gear. You cannot follow the entire cable though.




1: This is what a typical scenario looks like. Although, there can be great variations.
2: Engines are not started near the gate as there is groundcrew servicing the airplane and to avoid damages to close-by structures.