Words such as manzana (apple) and rosa (pink) are feminine, and would be paired with "la". La manzana would be correct, and el manzana would be incorrect. This is because of the similarity between the ending of the word and "la." Notice they both end with the letter a with an "ah" sound. Pato (duck) and Oso (bear) both end with an o, which is masculine.Using the word "La" on these words would be incorrect.
These two endings are some of the most common.
As for other words, I just studied them and which form of the word, "The" they belonged to. I'm sure there's a much more technical way to figure out exactly why certain words are masculine or feminine (such as "corredor" which means runner in English, and is masculine, and doesn't end with an a or an o) but I just guessed until I figured it out.
The same goes for plurals. If you wanted to say "The ducks," you would say "Los patos." If you wanted to say "The apples," You would say, "Las Manzanas."
I hope I helped! Sorry for the confusing response. I wish you good luck :).