Prejudice is, as the name implies, the process of "pre-judging" something. In general, it implies coming to a judgement on the subject before learning where the preponderance of the evidence actually lies.
Thus, for example, in Jane Austen's novel Pride and Prejudice, the heroine forms a strong opinion of a man's character before she has the chance to hear his side of the story. When the balance of the facts are finally made known to her, they challenge and ultimately overturn this prejudice. Prejudice is also a theme in To Kill a Mockingbird.
Sometimes this is a matter of fallaciously extending one's own experience to the general case. In other cases, it may be a matter of early education; those taught that certain attitudes are the "correct" ones may form opinions without weighing the evidence on both sides of a given question.
When applied to social groups, prejudice generally refers to existing biases toward the members of such groups, often based on social stereotypes. For example, a person who has had a series of bad relationships with those of the opposite sex may develop a prejudice against that sex, and thus assume that the factors souring the relationships are always present in members of that sex, and adopt the set of prejudices known as Censored page. Or, if a person has grown up with the concept that members of group "X" have certain characteristics, they may apply this prejudice by assuming that all members of the group fit that stereotype, as in racism, linguicism or homophobia.
It has to be stressed that prejudice is simply the formation of a judgement without direct or actual experience, not merely holding a politically unpopular view. Prejudiced views are often necessary at times for human survival as we don't always have time to form a personal view on a potential foe before adopting a defensive stance which could save our lives. To these ends a prejudicial or instinctive view on a person or situation is useful and aids survival.
This must be differentiated from viewpoints accumulated though direct life experience. These are definitively not prejudiced, conditioned or necessarily instinctive. They are not pre-judgements but post-judgements. Arguments which assert that all politically inconvenient views are based in lack of sufficient life inexperience begs the question - how much life experience is required before a person is entitled to a viewpoint?. If the assertion is made that no amount of experience ever entitles a person to a viewpoint then this precipitates a logical absurdity. Since anyone who opposes strongly held views must, by their own definition, also be prejudiced this invalidates their own proposition on the grounds of like prejudice. If every point of view is biased then there can simply be no objectivity. Is this really the case?.
Those who detract from the validity of personally held experienced viewpoints commonly cite racism or homophobia as cases without examining the actual proposition in more depth. Another interesting intellectual conundrum is to consider whether deeply held spiritual or religious views are also prejudiced since they are commonly not based on direct experience.
Confusion is often found in common speech between terms for personal views held in the light of experience and the legal term for a judgement having been passed. In law, the phrase "With Prejudice" implies a judgement having been made after the presentation of evidence. The term does not imply any form of bias.