There are not really any rules for the gender of nouns in German. That means you have to learn the article ('der', 'die, 'das') with every new noun you learn. You will get a sense for the gender of words after practicing speaking German a lot. There is one rule that can be useful: If you add an '-in' to make the female version of a profession (for example, 'Lehrer' and 'Lehrerin'), then the resulting noun is always female.