"I eat a banana."
Translation:Je mange une banane.
It's just grammar. You just have to learn whether a noun is masculine or feminine by looking at the definite article.
For example, "the apple" is "la pomme". That means that "apple" has the grammatical gender of feminine. "La" is the feminine singular form of "the".
There isn't a lot to say about masculine and feminine other than you just have to learn which noun is masculine or feminine.