A dystopia is any society considered to be undesirable, for any of a number of reasons. The term was coined as a converse to a Utopia, and is most usually used to refer to a fictional (often near-future) society where current social trends are taken to nightmarish extremes.
According to the Oxford English Dictionary, the term was coined in the late 19th century by John Stuart Mill, who also used Bentham's synonym, cacotopia, at the same time. Both words were based on utopia, analyzed as eu-topia, for a place where everything is as it should be; hence the converse "dys-topia" for a place where this is certainly not the case. Often, the difference between a Utopia and a Dystopia is in the author's point of view.
Dystopias are frequently written as warnings, or as satires, showing current trends extrapolated to a nightmarish conclusion. In this, they frequently differ from utopias; idealistic utopias have no roots in today's society, being in some other place or time, or after some major discontinuity in history (e.g. see H.G. Wells' utopias, such as The World Set Free).
A dystopia is all too closely connected to current-day society. A considerable number of near-future science fiction stories of the type described as 'cyberpunk' use dystopian settings of a high-technology corporate dominated world where national governments are becoming steadily more irrelevant.
The genre of post-apocalyptic science fiction often features dystopias.
Some famous dystopias are: