If a multiclass character's classes are not nearly the same level, then he suffers a multiclass penalty of -20% XP for each class that is not within 1 level of his most experienced class. These penalties apply from the moment the character adds a class or raises a class's level too high. For instance, a 4th-level wizard/3rd-level rogue gets no penalty, but if that character raises his wizard level to 5th, then he would receive the -20% penalty from that point on until his levels were nearly even again. The penalty is -40% if all three levels are uneven, for instance, a 5th-level wizard/3rd-level rogue/1st-level fighter.
Races and multiclass XP
A racially favored class does not count against the character for purposes of the -20% XP penalty. For instance, an 11th-level gnome character (a 9th-level rogue/2nd-level wizard) suffers no XP penalty, because he has only one non-favored class (wizard is favored for gnomes). Suppose he then achieves 12th level and adds a level of fighter to his classes, becoming a 9th level rogue/2nd-level wizard/1st-level fighter. He suffers a -20% XP penalty on future XP he earns, because his fighter level is so much lower than his rogue level.
A dwarf 7th-level fighter/2nd-level cleric suffers no penalty, nor does he when he adds 1st-level rogue to his classes since his cleric and rogue classes are only 1 level apart, and fighter is a favored class for dwarves.
A human or half-elf's highest-level class is always considered his or her favored class for purposes of the multiclass penalty. In version 1.69, prestige classes were excluded from this, so the favored class was the highest-level base class. However, in the Enhanced Edition this exclusion was dropped and a prestige class will be considered favored if it is the highest-level class the character has.
Human is not always the best choice to avoid an XP penalty. For example, a human 2nd-level fighter/8th-level wizard/8th-level rogue would suffer a -20% XP-penalty, a dwarf with the same class combination would not. Humans and half-elves can never suffer a -40% penalty.
Because polymorphs (including spells like shapechange and a shifter's abilities) change a creature's race, the multiclass penalty can also change while one is in effect. Generally, excluding some rare cases in which the opposite can hold, this means sometimes introducing a penalty for Tenser's transformation and the drow form of humanoid shape, while reducing or eliminating the penalty for other polymorphs. More precisely, the polymorphed character uses the favored class of the new race, and the favored class of all non-playable races is the same as for humans (the highest base class). Furthermore, the standard polymorphs that change a creature to a playable race are only available to players via Tenser's transformation and the drow form (both change the race to "elf").
Prestige classes and multiclass XP
Prestige classes are exempt from the multiclass XP rule and do not contribute to the multiclass penalty. For example, a character with one base class and any number of prestige classes (such as a 10th-level rogue/3rd-level shadowdancer/7th-level assassin) will not suffer any XP penalties no matter what race the character is. Similarly, a character with levels in a favored base class and at most one other base class (and possibly levels in a prestige class) will not suffer any XP penalties. However, a character with two non-favored base classes could suffer a -20% penalty; this character will not, though, suffer a -40% penalty, even if the character has levels in a prestige class. A -40% penalty can only occur when a character has three base classes (and only when those classes are not nearly the same level).
In version 1.69, a human or half-elf with a prestige class would never suffer a multiclass penalty, as one of the base classes would always be favored. This is no longer the case in the Enhanced Edition. For example, a human 6th-level fighter/4th-level paladin/7th-level champion of Torm will have two non-favored base classes and one favored prestige class. The non-favored base class levels differ by more than one, so there is a -20% XP penalty.