Though most nouns in the Russian language have only one of the three possible genders (masculine, feminine or neutral), some words are not so simple. Sometimes, nouns can be both masculine and feminine:
сирота – an orphan
умница – a smart person.
зануда – a sickener, a PITA, a very boring and annoying person.
ханжа – a hypocrite
ябеда – a sneak
подлиза – a flunkey, suck-up
All words mentioned above and many more like them are masculine, when applied to a man, and feminine, when applied to a woman. So if you want to add an adjective before one of these nouns, consider the gender is the person you are talking about and choose your adjective ending accordingly:
Мой друг – бедный сирота. (My friend is a poor orphan)
Моя подруга – бедная сирота. (My girlfriend is a poor orphan).
Sometimes, a noun's gender is the opposite of a person's sex. In particular, this applies to occupations and professions, which are normally masculine and ignore the sex of individuals. You may say Он – хороший программист/ Она – хороший программист. (He/She is a good programmer). In both cases the word "программист" is masculine. For some occupations, there are variants for male and female, but even then masculine is preferable and stylistically neutral, while feminine sounds more informal and sometimes rude.
Учитель/ учительница (a teacher, male/female),
программист/ программистка (programmer, male/female),
переводчик/ переводчица (translator male/female)
These words are stylistically neutral, can be used in both formal and informal speech. You wouldn't offend anyone choosing the masculine even if you are talking about a woman, but feminine nouns would sound Ok also.
Врач (a doctor, masculine, may refer to both male and female doctor) is neutral, but врачиха (feminine, female doctor) is very informal and may be offensive.