A Dystopia is best described as the opposite of a Utopia; a society/societies that exist in controlled, repressed states; that are imperfect, but are often disguised by their governing forces as a Utopia. A Dystopia is the primary setting for Dystopian science fiction, and more often than not tends to be set in the very near future, but can be set in any number of timelines; whether it be far future or alternate.
Dystopian science-fiction is often used convey popular social issues. This can range from the ramifications of mans manipulation of genetics and other technologies, to the state a society would be in if it were to fall under a certain type of rule (i.e. dictatorship or totalitarian government). A famous example being The Handmaid's Tale, using a near futuristic dystopian setting to present a feminist's criticisms on modern day society.
The protagonist of the dystopia, will to tend to come in to conflict with the ideals of the society, often fighting to resist or undermine them. Any villains are often representatives of the societies rulers, working to either stop the protagonist, or 'convert' them.
Dystopian science-fiction is diverse in that it can range from action packed, to slower paced dramas. Some famous examples being Do Androids Dream of Electric Sheep (adapted into the movie Blade Runner) representing the former, and George Orwell's astounding Nineteen Eighty-Four representing the latter.
Notable examples of the sub-genre:
The Handmaid's Tale
Do Androids Dream of Electric sheep?
The Hunger Games
A Clockwork Orange