When referring to genders:
- 男 and 女 are used for human beings.
- 公, 母 are used primarily for animals in written Chinese. The two words may be used for human beings in some spoken Chinese topolects, but I think in Mandarin, this is not a customary use. But of course, the two words can be used for humans in other contexts, e.g. 母親 (mother) and 公公 (maternal grandfather, an old man or in figurative speech, a male human-like character, e.g. 太陽公公).
- 雌, 雄 may refer to human beings and animals (edit: and plants as well), but they are less frequently used for humans except in classical Chinese or in scientific reports.
However, note that "男女" and "雌雄" are valid compounds (as in 男女不分 or 雌雄莫辨), while "公母" is not (at least not in customary uses). Though, in spoken Cantonese (but not Mandarin), 乸 is used in place of 母 when referring to genders and "公乸" is a legitimate compound word.
Also, the compound word "男女" can be used to mean a group of people that consists of both genders. E.g. 一群男女從旅館走出來 "a group of people (with men and women) walk out the hostel", but "雌雄" and "公乸" have no such (or analogous) uses.