"What did you eat?"
Translation:तुमने क्या खाया?
The past tense is a little strange in Hindi. When using a transitive verb, you would use the particle ने following the subject. A transitive verb is any verb that can be done to something. For example, you eat a vegetable or draw a picture. Meanwhile, intransitive verbs cannot be "done" to a noun. For example, sleep, appear, or look would all be intransitive verbs.
This sentence is using the transitive verb खाना (to eat). Because we are putting a transitive verb into the past tense, you would have to add the particle ने after the subject of the sentence, resulting in तुमने. Next, the transitive verb will always take the gender of the noun it is acting on. For example, if we were talking about an apple, the sentence would be "तुमने सेब खाया." However, if you were talking about a vegetable, the sentence would be "तुमने सब्ज़ी खाई."
Past tense of खाना
Because we are not talking about something specific being eaten, the past tense of खाना would default to the masculine खाया.
I remember this being described as Hindi having an ergative case (a special case for transitive verb doers found in Basque, Georgian, and some other languages), but only in the past tense. I wish we were able to get a little more practice with it.