The Ultimate Intrigue (which brings intrigue-related optional rules) and Spymaster Handbook (which expands on it and brings the Recall Intrigues rules) came to increase our options to identify exactly "what is that guy doing?". We can use the Knowledge skill upon seeing an ability or feat being used to try to identify what just happened:
Recall Intrigues (Knowledge)
You can identify feats and the class features of various classes with successful Knowledge checks when you observe the feats or class features being used.
Check: You can attempt a skill check to identify a feat or class feature when you observe it in use, similar to how Spellcraft can be used to identify a spell. The feat or class feature must have some observable effect in order for you to attempt the Knowledge check. For example, you can’t see the internal determination of Iron Will, so this ability can’t identify that feat. In general, if a feat or class feature creates a noticeable effect (such as the extra attack from using Cleave) or has a variable modifier a character must choose to use (such as Arcane Strike, Combat Expertise, or Enlarge Spell), it can be identified. If it creates a static bonus (such as Dodge or Lightning Reflexes), there’s no telltale sign to give it away.
The Knowledge skill required to identify a feat or class feature varies depending on the type of feat or class feature to be identified and is outlined in the Recall Intrigues (Knowledge) table above, along with the DCs of such skill checks.
To identify arcane abilities (wizards, sorcerers, magi, arcanist) that would be Knowledge (Arcana), to identify divine abilities (clerics, paladins, oracles) that would be knowledge (Religion), to identify nature-related abilities (druids, rangers, hunters) that would be Knowledge (Nature), to identify martial abilities (power attack, sneak attack, flurry of blows) would be Knowledge (Local).
So, a character could know about classes and their abilities, but if they lack the proper knowledge to do so, they can't possibly understand what is going on (other than it's magic).
With a Knowledge (Arcana) check, you could know that arcane spellcasting is disrupted by armor. However, not all classes are affected by armor the same way. Wizards and sorcerers (who do not invest on the right feats) cannot use any armor without a risk of losing their spells, while bards and magi can wear light/medium armor without the same issue. So, there is no way to tell if that guy wearing robes is, in fact, a wizard, or he is a bard who found nice robes and decided to wear them.
With that said, the concept of classes are not known in character, at least, not as we know it. That is an out of game concept based on the fact that this is still a game and we need certain rules to play it. PC's and NPC's will know that there are wizards, sages, sorcerers, witches, warlocks, demonologists, necromancers, astrologers, enchanters, diviners, and so on. But what exactly each of these titles means are just that: titles.
In character, a "class" is very similar to a profession, the guy who makes breads is known as a baker, a guy who does spells is known as a wizard or sorcerer, but maybe women who does spells are known as witches, even if their actual class (as per game system definition) is Bard.
The word "class" may even have a different meaning depending on your setting. The Pathfinder wiki, which gathers information about Pathfinder and Golarion (Paizo's official setting for Pathfinder) defines classes like this:
Not everyone is born the same: people have differences such as race, ethnicity, temperament and religion. People are also differently skilled: some are devout followers of gods, artists, brutal fighters, or perhaps trained scholars of the ways of magic. Scholars tend to categorize such differences as classes. Some people seem to exhibit few special characteristics and may be classed by their role in life: perhaps as aristocrats or mere commoners. However, some develop heroic capabilities and may grow in power with experience in their class.
Those titles and what they mean will change based on the game setting played. Some settings have different names for certain game classes, sometimes a single title can be used for a variety of classes. Like, on Dark Sun, the guards on the city of Tyr are known as templars, but they are fighters, rangers, brawlers, inquisitors, clerics, etc.
The ability to identify a class ability is based on recalling information known previously. You did read or see that certain type of people, known by the scholars as Sorcerers perhaps (or not, that's a GM's call), do show traits of draconic lineage, which allows them to breath fire and grow leathery wings and fly.
On your example, a "necromancer" is a word that the goons might not even know what means, unless their boss explains it to them or they have some ranks on Knowledge (Arcana) or Spellcraft, and if they do know it's probably something like "well, it's a bad guy who can raise the dead". Not only that, there are multiple ways to build a necromancer character in the game system: Wizards who learn necromancy spells (even if their actual school is not Necromancy), Sorcerers, Clerics, Oracles, Witches, Shaman, etc. Or pretty much anyone with access to Animate Dead, Raise Dead or the ability to channel negative energy. A clever wizard could even buy himself a suit of Mock Armor and pass as a fighter-type of some sort.