"When she eats, I drink."
Translation:Wenn sie isst, trinke ich.
The verb has to be in the second position in a main clause, e.g. Jetzt trinke ich.
In this sentence, the first position is filled not by an adverb such as jetzt but by a subordinate clause wenn sie isst. But the verb still has to come right after that in order to be in the second position.
So the subject and verb are reversed here because there is something else (not the subject) before the verb already.
You can also put the subject first, in which case the subordinate clause has to come later: Ich trinke jetzt / Ich trinke, wenn sie isst.