You see them everywhere in fantasy and science fiction worlds. Any time you're working with a fictional world, chances are pretty high you'll find a group of people or aliens that nobody likes. If you're designing your own world, it's common enough to have this happen, and you'll find yourself saying, "Everybody hates this social group. I need to figure out how other people insult them for who they are."
My first piece of advice to you is to take your time figuring this out. Don't rush.
Any group of people will most likely have several names, and it's good to think through what they all are, and in what contexts they might be used.
- There will be the name they give themselves; this name may or may not be used by the rest of the population to refer to them. It will most likely have some historical significance, and you may want to spend some time thinking of etymological origins for it. An example of this in the real world is "Roma," which is the name of the group commonly referred to as "Gypsies." In my Varin world, "Akrabitti" is the family name used by the undercaste. The significance of this word will not be at all derogatory, but will likely be proud, because it's an insider word.
- There may be a sort of neutral descriptor for their social position. By this I refer to words like the word "undercaste" itself. A word like this is much more anthropological-sounding, and it typically won't be used a lot by people in normal conversation, because it will make people sound like they're analyzing their own social structure in a very neutral and detached way.
- There will probably be an "official name" for them. This may or may not match the people's term for themselves, but it will be the way that they are referred to by governments, or when they are being talked about in terms of their relation to the larger society and its social groups. One way to think about this one is to compare it to scientific terms for taboo body parts. Most people will know the term, and everyone will know it's the official term, so it should be okay to use it, but they'll still feel a bit uncomfortable saying it. An example of this from my fiction would be the word "Lowland" or "Lowlanders" to refer to the oppressed group of aliens in my story, "Cold Words." In my Varin world, "Akrabitti" is used both by the undercaste themselves, and by the government to describe them.
- There will be a common way they are referred to by people who despise them (and possibly more than one). This one will be a slur, and everybody will know that it's a slur. It will be short, and easy to say. I think the most common mistake I see for terms like this in fiction is when people use the official term as a slur, which makes everything feel clunkier. Designing slurs is harder than it looks, because of the way they have to roll off the tongue. To think of where these will come from, think about the reasons why these people are despised. What is it about them? Is it their appearance? A good example of this comes from Ender's Game, where humans refer to their enemies as "buggers" because they look like bugs. Is it a behavior? In "Cold Words," (Analog Oct. 2009) the Lowlanders are called "Shiverers" because they have a tendency to shiver in cold weather (they have less fur than the dominant group), and because shivering is the particular behavior that marks them as undesirable. In "The Liars," (Analog, Oct. 2012) the group is called "Liars" because (for various physiological and linguistic reasons) they are the only people in the society who are able to lie without being detected - not that they do!
I had a friend hand me a huge breakthrough. Jamie Todd Rubin suggested that I should use the word "trashers" to refer to these people. I immediately recognized that this was the right type of word I should be working with, and I'm very grateful to him for thinking of it. At the time, though, I remember saying to myself "that's so perfect - I only wish it referred to all of them." The additional complexity here is that the Akrabitti do three main jobs, not just one: they can collect trash, they can cremate the dead, or they can clean prisons and feed prisoners. Nonetheless, I figured that "trashers" would work, because it's clear that trash collection is a much more widespread profession than cremation or prison work.
I was writing along, though, when something amazing happened. I came up with a second term spontaneously, just based on the situation I was writing. I'll try to give you a quick picture of how it happened. Three of my characters - my main character, Tagaret, his mother and his young cousin Pyaras - had just witnessed the funeral of the Eminence, and were watching members of the lower castes present themselves to the newly "crowned" Eminence to place their people under his protection. However, Tagaret noticed that the Akrabitti were absent, and was troubled because he didn't see how the Eminence could have completed his obligation to protect all the people of Varin without them being there. Here was the sequence that followed:
Pyaras made a face. "Who'd want to see a trasher, though?"
"Pyaras," said Mother, chidingly.
"Well, they don't."
"It's not that." Mother lowered her voice. "It's the ashers they don't want to think of."
You can probably see that this was one of those moments where my subconscious took decisive action. My characters were thinking about a person who had just died, and "trashers" turned itself into "ashers" spontaneously. I felt like I'd been hit by lightning. How obvious was it, anyway, that I had to have three terms for the undercaste based on their jobs, rather than just one? For some reason, though, I'd never thought of it over all these years working with the world. So I then decided that I had to find the third term - that for the prison workers - and I started working on it concertedly. I decided quite early on that I wanted it to be a single syllable, because I wanted it to have a "lions and tigers and bears" rhythm. I think I wanted that because I imagined the possibility of using the three terms as a taunting chant. It's not the sort of thing that the characters above would ever use (because they are quite concerned with manners), but there will be other people in other contexts who might use it. After several hours of trying different options, I came up with "slops." It does what I need it to do, because it expresses the mopping and slopping cleaning aspect of the prison jobs, and also has an aspect of "feeding pigs" which I believe works when it comes to the idea of feeding prisoners. So finally I feel as if I've found something that's easy and really plausible (whew!).
To this point, I haven't mentioned the idea of using derogatory slang for groups who are more powerful, but some of the same principles apply. Just because a particular group is supposed to be admired doesn't mean they will be, and so they may very well be referred to disrespectfully by others. This does happen in Varin, but the point of view characters I'm working with don't tend to do it (just because of who they are). It's really far more a question of people marking group insiders and group outsiders than a simple question of higher or lower status. Just keep in mind that insiders to a group are less likely to use the official name of their group when speaking with other insiders. An example from Varin is when Aloran, a member of the Imbati servant caste, gets suspicious because a fellow servant calls him "Imbati Aloran." The other servant would normally just call him "Aloran," or if he didn't know Aloran's name, he'd call him "castemate."
It's good also to be aware of the way that taboo status will tend to "contaminate" terms. To take an object example (rather than a human example), the toilet has a lot of euphemistic terms used to describe it, because the longer a word is used to refer to something considered dirty or taboo, the more likely that word is to take on the taboo feeling and thus be considered too impolite for common use. Thus, depending on the situation you're working with, you may want to consider whether the terminology used to refer to a group has changed over time, and whether that's relevant to your story.
If you are looking for more examples, I encourage you to look around at your own daily life. Not all slang labels are really dirty/derogatory, and you can probably find good examples of social labels in your company, or your neighborhood, or your memories of school. You can also find a lot of good examples of slurs and insider/outsider terms in YA literature, because many of these authors show sensitivity to the way that cliques and social groups refer to one another.
It's something to think about.