The utopia and its offshoot, the dystopia, are genres of literature that explore social and political structures. Utopian fiction is the creation of an ideal world, or utopia, as the setting for a novel. Dystopian fiction is the opposite: creation of a nightmare world, or dystopia. Many novels combine both, often as a metaphor for the different directions humanity can take in its choices, ending up with one of two possible futures. Both utopias and dystopias are commonly found in science fiction and other speculative fiction genres, and arguably are by definition a type of speculative fiction.
Dystopia is defined as a society characterized by poverty, squalor, or oppression.
Dystopias usually extrapolate elements of contemporary society and function as a warning against some modern trend, often the threat of oppressive regimes in one form or another. Many utopias can be seen as dystopias in regard to their treatment of the issues of justice, freedom and happiness. Samuel Butler's Erewhon can be seen as a dystopia because of the way ill people are treated as criminals, but as far as the people 'living' in his novel they are in a utopia. The main point of a dystopia is to make people think about the world in which they live and to see how the idea of happiness can be perverted providing the members of society know little else. Aldous Huxley's novel Brave New World is also often seen as a dystopia because of the conditioning of the society, the loose sexual morals, the willful settling for superficial (and drug induced) happiness, and the creation of prosperity on the backs of an enslaved "inferior" class.