What's the difference between stereotypes, prejudice and discrimination? I'm especially interested in the difference between the first two. Some people have said prejudice is when a stereotype about a group is applied to an individual, but a lot of places (even within psychology) talk about prejudice as though it can also apply to a group. Allport described prejudice as an "antipathy" towards another group, but that doesn't seem to describe implicit prejudice. How exactly are these terms defined?
The terms are sometimes used a little differently. Nevertheless, in psychological research, there is quite some consensus about their use. For example, reflecting the most prevalent view, the Resolution on Prejudice, Stereotypes, and, Discrimination of the American Psychological Association (2006), defines them in the following way:


  prejudices are unfavorable affective reactions to or evaluations of groups and their members, stereotypes are generalized beliefs about groups and their members, interpersonal discrimination is differential treatment by individuals toward some groups and their members relative to other groups and their members, and institutional discrimination involves policies and contexts that create, enact, reify, and maintain inequality (Dovidio, Brigham, Johnson, &amp; Gaertner, 1996; Eagly &amp; Diekman, 2005; Fiske, 1998; Lott &amp; Maluso, 1995; Mio, Barker-Hackett, &amp; Tumambing, 2006; Myers, 2005; Nelson, 2005; Shih, Pittinsky, &amp; Ambady,1999)


In other words, if Person A does not like (has a negative emotional reaction toward) the Lokai in general, or Person B (whether explicitly or implicitly) in particular because this person is a Lokai, that's prejudice.

If Person A believes that being a Lokai makes Person B a treacherous, lazy, and dumb guy, but a great cook and guitar player (you have to grant them that!) that's a stereotype.

If Person A doesn't invite Person B to his/her party because he/she is a Lokai, that's discrimination.