For the single best point ever made about this subject, see
here.
In my game, there's an arbitrary amount of information about "well-known" classes (an amount of information basically controlled by me, the DM), while "rare" classes are usually unknown unless you make a basic knowledge skill check. Some classes are completely off limits to PCs, and PCs cannot know about them unless they have encountered them in the game, with no amount of knowledge skills, simply because there is no knowledge of these classes anywhere in the world.
Examples:
I'm running a more or less stone age campaign low on magic. "Hunters" (Rangers) are the most common of the more 'exciting' professions, and it's fairly obvious what those guys can do. Even 1st level characters know that the rare hunter might develop such deep understanding of nature that he is capable of mystical feats (Ranger spells) - although some "hunters" specialize more in pragmatism and mobility (Scouts) and less on the mystical side of things.
Most "warriors" in the world focus on passionate, emotional fighting, using bursts of wrath to overcome their enemies and the pain from their own wounds - everybody knows the rage mechanic, which is considered the basis of any "true" warrior. Some warriors are more controlled, more focused on perfecting particular stunts and tricks (Fighter, Monk), or they might even prefer to fight sneaky and dirty (Rogue) - these alternatives are generally considered inferior, but to each their own. So people don't specifically differentiate between Barbarians, Fighters, Monks and Rogues, except for the rage mechanic, which has in-world implications of honesty and power.
"Wardens" (Paladins) exist in many communities and have high status. These are trained warriors who deliberately choose to give up the way of passion and replace it with dedication. Besides being already respected for their (normally great) natural charisma, wardens are usually held in great awe: they are so much in touch with what is wrong and right that the ancestors send them visions of evil on the prowl (Detect Evil), and mystical powers to combat it (Smite Evil). This is also generally known.
Sometimes, the spirits reach out and touch a mortal, enabling them to heal and do other things beside. Some of these "touched" are beloved by an animal spirit and can change their shape to match their totems (Druid), while others are empowered to a lesser degree but can still work miracles (Favored Soul, Spirit Shaman). These people are rare and not every community has them, but they are nevertheless well-known. The shapeshift mechanic (only this Druid variant exists in my game) and the basic healing spells (cure x wounds, remove blindness/deafness, remove disease, delay poison, lesser restoration) are known by next to everybody in the game world - at least their existence, if not their detailed application.
Item crafting is generally known to exist. "Charms" (protective items) and "fetishes" (especially low-level healing and buffing potions/scrolls made of divine spells) are in use by many hunters and warriors, while powerful "charmed" weapons are the stuff of many fireside tales.
Some people just have it in them to cast (arcane) magic, but more than that is secret knowledge. Without ranks in Knowledge (Arcana), people in my game world don't know even the most basic things about Sorcerers, Dread Necromancers, and Warmages - which are the only full casters allowed for PCs. Names for these include just about anything you might want to call them - calling somebody a "sorcerer" or "necromancer" in-game says nothing about their class features or spell selection, just about people's perception of the guy in question.
Warmages and Sorcerers are not in any way perceived as differring, while Dread Necromancers are decidedly seen as evil bogeymen. Knowledge about specific spells requires the Spellcraft skill, but the general spellcasting mechanic of spontaneous arcane casters are known to those with any ranks in Knowledge (arcana).
Dread Necromancers are limited to a far-removed region in my game world, so their class features are not knowable to PCs without several ranks in Knowledge (Geography) or a background that includes hailing from the frozen Nightside region.
"Bards" have a special place in many communities, but most of these are just Experts with some knowledge skills and perform (storytelling). Bards (as in, the PC class with its magical abilities) are just as rare as Sorcerers; their magical powers are not distinguishable from those of Sorcerers. Bards who cast spells are just seen as bards who happen to also have been born with the talent. The mechanics of bardic music are only known to members of the Bard class, and it's an embodied knowledge of experience, not something you could just tell somebody who hasn't got music in their blood, as well.
Finally, there's the unknowable classes. There's a group of antagonists in my game (actually, a whole race of them) which makes exclusive use of certain classes. PCs cannot be of this race, nor do they know anything about these guys until they encounter them in-game. The antagonist race hails from a high tech world, and since "any sufficiently advanced technology might as well be magic", that's what I'm rolling with: most of these baddies are Wizards, Artificers, Duskblades, Factotums, or Swordsages. None of their class features can be understood by PCs until they've seen them in action.
Interestingly, the bad guys have a similar lack of knowledge about certain PC classes. They simply cannot conceive of the inborn talents of a Sorcerer or Warmage, the powers of a Dread Necromancer are horrible and strange to them, bardic music makes no sense to them, and Druids ("ecologists" to the antagonist people) are the stuff of legends to them - they once had them, but they died out for unknown reasons, and their skillset can only be guessed at from myths and fairytales nowadays.
Finally, there are the one-of-a-kind classes. One of the PCs is a Warlock, and
nobody else in the game world is one or has ever seen one. So nobody (not even she herself) knows what the hell is going on when she uses her invocations! She's just "special", the perfect individual.
There has also been a one-of-a-kind NPC, a high level Binder. Again, nobody knows what "a" Binder is. He himself just comes across as completely schizophrenic, with different personas sporting different powers and abilities, and since my players have never read Tome of Magic, they didn't know what was going on either - great times!