Ukraine has pretty good Railway system, booking your train online is pretty easy and can be done via the official railway website:

Online reservation and purchase tickets - Ukrzaliznytsia
Train tickets by Ukrainian Railway online: reservation (booking) and buying train tickets online using Visa/Mastercard cards. Available seats on the train, tickets cost, tickets prices, train’s schedule.

Trains are generally in good conditions, the best ones are the IC+ ones which are almost the same as the european ones.

Online tickets (QR code on your phone) are accepted, so no need to get a print out as in some other countries.

The food is a bit average compared to European trains, some new trains have a restaurant with some standing tables but overall its perhaps better to get your food with you.