People are convicted of war crimes, in proceedings conducted after they are arrested, often by the International Criminal Court, which is currently investigating the situation in Ukraine. Like any other crime, following a trial and conviction, there would be a sentence which would include a long period of incarceration, and there might be other penalties.
People aren't convicted of war crimes in absentia. Instead, they are arrested and then tried and a sentence imposed. War crimes tribunals, either ad hoc, or pre-existing, issue arrest warrants which states that support them enforce if they can.
Individuals can also be sued or have economic sanctions imposed upon them and be punished to some extent that way (a lawsuit requires proper service of process upon a defendant by a court with jurisdiction over that person, but not participation of the defendant in the trial). Governments can and sometimes do also order the killing of an individual war criminal as part of military action that it has authorized.
This said, most high level war criminals are never punished because they die of old age before any body with the power to punish them ever manages to do so, and sitting heads of state have nearly absolute immunity from many kinds of lawsuits relating to their official acts that many jurisdiction's courts would observe.
Countries generally are not convicted of war crimes, although they may be required to pay reparations, particularly, if they lose the war, which are usually part of a surrender treaty or the functional equivalent that is imposed on the loser without its consent.