Mating type genes regulate sexual compatibility and sexual reproduction in fungi. This review focuses on recent molecular analyses of well-characterized mating systems from representative ascomycete (Neurospora crassa, Podospora anserina) and basidiomycete (Ustilago maydis, Coprinus cinereus, Schizophyllum commune) fungi. These mating systems include many conserved components, such as gene regulatory polypeptides and pheromone/receptor signal transduction cascades, as well as conserved processes, like self-nonself recognition and controlled nuclear migration. The components' structures and their genetic arrangements in the mating system vary greatly in different fungi. Although similar components and processes are also found in ascomycete yeasts (Saccharomyces cerevisiae and Schizosaccharomyces pombe), the filamentous systems exhibit properties not encountered in yeast. Mating type genes act within, and control the development of, spatially differentiated fruiting bodies. The complex mating systems of basidiomycetes, unlike ascomycete systems, involve novel one-to-many specificity in both pheromone-receptor and homeodomain protein interactions.