You can say "yiyor musun" too, both are valid. But they have different meanings. When you are making a yes-or-no question with "mi," you choose which word to associate it with and that word becomes the focus of the question. Whichever word you add "mi" after, it is like saying "or is it the opposite of this." So, in this example:
"Sen elmayı yiyor musun?" = "Are you eating the apple? [Or are you not eating?]"
"Elmayı sen mi yiyorsun?" = "Are you eating the apple? [Or is someone else?]"
In English you express this with the rhythm of how you say the sentence out loud. If you try saying it out loud with the first intended meaning and then again with the second intended meaning, you will hear that the second time the pitch changes a little to lean on "you." "Mi" performs the same function in Turkish.