What exactly are Prestige classes, and what purpose do they serve? Are they, in any way, better than the default classes? Do they have any disadvantages/advantages to them?
From the DMG, pg176:
Prestige classes offer a new form of multiclassing. Unlike the basic classes found in the Player's Handbook, characters must meet requirements before they can take their first level fo a prestige class. The rules for level advancement (see page 58 of the Player's Handbook) apply to this system, meaning the first step of advancement is always choosing a class. If a character does not meet the requirements for a prestige class before that first step, that character cannot take the first level of that prestige class.
Basically, when you gain a level, you can choose any basic class to gain a level in (unless you're ineligible for alignment reasons). You could instead choose a prestige class, if you meet the prestige class' requirements.
Prestige classes (henceforth PrCs, the typical abbreviation) allow specializations or options not available in base classes, or make it easier to combine different base classes.
Some examples from the DMG are the Arcane Archer, which allows a character to imbue their arrows with magic, the Arcane Trickster, which combines rogue skills & sneak attacks with arcane spellcasting, and the Blackguard, which allows an evil fighter-type to become an anti-paladin.
You can't discuss advantages/disadvantages of PrCs in general: the quality range is simply too wide. Some PrCs offer very nice benefits to players who meet a few simple prerequisites they might want to get anyway, while others require you to meet excessive requirements for fairly minimal benefits.
Almost every class can benefit from taking carefully selected PrCs rather than continuing in their base class (especially wizards), but it's generally best to ask people who are familiar with all the PrCs what choices are best for your base class to aim for (the Giants in the Playground forums are one good place to ask, but you can also try here). Be sure you mention which source books your DM allows you to use PrCs from, as across the couple dozen official 3.5 rulebooks there are well over 100 PrCs. You should also find out if there are any PrCs that your DM specifically forbids: a few are so good that many groups ban them, or strongly enforce any roleplaying restrictions attached to the PrC in order to discourage players from taking them.
It's generally not a question of whether you should take levels in prestige classes so much as which ones and when.
Note that the requirements for most PrCs can't be met until your character is at least level 5 or 6, if not higher, so if you know the game isn't going to reach at least level 6, it's generally not worth worrying about prestige classes.
Some background: prestige classes were a new concept introduced to D&D 3e by game designer Jonathan Tweet, who said that he based them on the cult levels in Runequest (one, two, three). There, each character progresses in two main ways: first by improving their skills through, and secondly by getting access to cult knowledge, where progress in the cult unlocks the most powerful magics in the game. Progress in the cult went through stages: first initiation, and then a mastery that usually came in two flavours, either rune lords, who are the heroic actors of the cult, or rune priests, who are the guardians of the cults ways. By joining a cult, though, the character shapes themselves: simply belonging to one cult or another affects how others view you, and some cults have drastic restrictions, e.g., the main healer cult forbids its initiates from killing, and rune levels generally come with big time commitments.
In D&D, prestige classes work in a somewhat similar way: they are a second realm of endeavour that opens up new possibilties for characters, many giving special abilities that can be gained in no other way, where advancement in prestige requires some basic professional skill, but can be pursued independently. They give an excellent opportunity to provide colour to PCs.
The prestige classes in the Defenders of the Faith show off the mechanic in a manner close to that of RQ: the prestige classes involve religious commitments and ties to game world organisations.
So, to answer your questions, the purpose of prestige classes is to add interest (in both the game appeal and narrative value) to character development; they may be better in that they open up possibilities for the characters - talk of character builds often leverage prestige classes. As for disadvantages, they are costly in terms of XP, and they may involve onerous commitments.
The upside is that you are supposed to get a more specialized ability set and have something to look forward to as your character develops. On the downside, everyone and their mother tends to want to make a prestige class for that flavor of the week, so be very careful when selecting one about how it applies to the campaign you're in.
Prestige classes are meant to be homebrewed, the 3.5 DMG - and moreso the DMG 2 - is very clear about that. They're a way to integrate narrative and mechanics. Say for example you have a forest-dwelling race who are master archers. You can (and probably should) make their favored class ranger, yes, but you can also make a prestige class for them that grants bow-related bonuses (e.g., arcane archer). Say you have a guild of master thieves, so skilled in their thievery it's like magic, reality defers to their expertise, you could make a class that combines elements of wizard and rogue, using magic to enhance their skills (e.g., arcane trickster). The prestige classes in the book are just examples, "the best prestige classes for your campaign are the ones you make yourself."
Yes, depending on the situation, a prestige class can be charming more powerful than a base class. A prestige class also adds a new flavor to the classes — for example, a Hospitaler is a cleric committed to an organization, while a Cavalier is a fighter specialized in mounted combat.
Prestige classes offer focused mix of flavor and advancement: if you want to make a good archer class, the Deep-Wood Sniper prestige class is the way to go; if you want to become any monster possible, the Shapeshifter is the way to go. Basically, taking a prestige class adds new roleplaying elements to your base class.
Prestige classes are very diverse in what they offer in terms of advantages and disadvantages. Some prestige classes excel in certain situations at the expense of other situations. Some prestige classes excel in a role like healing in exchange for less survivability (like the Radiant Servant of Pelor). And so on.