Study the train schedule, select the appropriate train.
Go to the railway ticket office with a Ukrainian passport and get a free ticket. It is better to do this as early as possible, because there may not be tickets on the day of departure and even the day before departure, especially during the holiday season in summer.
Official website of the Georgian Railway: https://www.railway.ge/en/
Boarding the train takes place on issued tickets, including free ones. It is also mandatory for the passenger to have an identity document.
Update: The free travel program is closed, Ukrainians need to pay for rail travel at regular rates.