It depends on wich pronoun! You can't translate it without the pronoun, the conjugations change for all the person, unlike English where several persons share the same conjugations.
Eu comi =I ate./ Você comeu =You ate. /Ele (Ela) comeu=He ate/ Nós comemos. = We ate / Vocês comeram =You ate. / Eles (Elas) comeram =They ate.
Just like spanish yo comi/ tu comiste/ ella comio/ el comio/ usted comio/ nos comimos / ellos ellas comieron
For other pronouns:
Eu comi Tu comeste Ele/ela/você comeu Nós comemos Vós comestes Eles/elas/vocês comeram
Honestly...when I hear this language being spoken, none the less, try to pronounce it myself, I usually make a ton of mistakes. Though oddly I'm actually getting these right...very curious since the robot voice is horrendous.
The subject and the complement of the action are not related. When you say: "The boy buy a female dog", there's no link between the gender of the boy and the gender of the dog. Uma is feminine because maçã is feminine. Ele is masculine because the person who eat is masculine, no links.
Ele come umA maçã - its correct, ele come um maçã it's wrong, it's as i write, he eat a apple, if you speak, the people know, but is wrong.
"a" = the (feminine). I don't see the confusion, please, explain more your problem, I'm sure some people well help you.
A = feminine, but "uma" not refer to feminine, and yes to quanty, then, uma = one, uma maçã = one apple, but if you type "um maçã" it's as you refer to apple as man, and apple is one fruit, no a people, :)