Most Korean learners are confused to tell the difference, but check the answers following the questions.
"WHO" ate my pizza?
> I did.(not others but "I")
= 내가 먹었어(O) / 나는 먹었어(X)
"WHAT" did you EAT?
> I ate the pizza.
= 나는 피자를 먹었어(O) / 내가 피자를 먹었어(X)
(I ate something which is the pizza)
\^o^/