The extreme polymorphism of antigen-presenting genes of the major histocompatibility complex (MHC) has spurred intense research unparalleled for any other gene family. This applies also to teleosts where sequence information is available for 3559 MHC class I and class II allelic variants from 137 species. This review summarizes current knowledge on the origin and maintenance of diversity at classical MHC loci. Most studies identified positive selection (i.e. elevated rates of non-synonymous over synonymous substitutions, dN/dS) as a sign of balancing selection. A meta-analysis on nine species with sufficient numbers of class I and class II sequences revealed that recombination rate and intensity of positive selection were positively correlated, suggesting that recombination and gene conversion played a significant role in shaping the allelic repertoire. Processes that create diversity over long timescales need to be complemented by contemporary balancing selection, either through overdominance or frequency-dependent selection, in order to explain the high allelic diversity observed today. While some evidence for overdominance exists for a few taxa (mainly salmonids) by correlating parasite infection data or survival to MHC genotypes, field or experimental data on negative frequency-dependent selection are lacking altogether, even though some fish species are particularly suitable as model systems. Theoretical predictions suggest that negative frequency-dependent selection is necessary to maintain the existing polymorphism. Hence, future empirical studies should focus on detecting signals that differentiate between mechanisms of contemporary selection rather than repeatedly showing historical selection events.