Dwarf Fortress is a single-player high fantasy game in the style of old ASCII roguelikes, such as ADOM or Nethack. You can control either a dwarven fortress or a single adventurer in a randomly generated, persistent world complete with its own unique history and inhabitants.
Overview
Slaves to Armok: God of Blood Chapter II: Dwarf Fortress (known simply as Dwarf Fortress) is a hybrid roguelike/ city builder game that takes place in a uniquely generated world that is created by the user at the start of the game. Dwarf Fortress lacks any sort of proper graphics, and instead opts to use ASCII symbols to represent the entire game world (though there are mods that change that). The game is most popular for its Fortress mode, in which you control a dwarven outpost that borrows many elements from traditional sandbox city-builders. There are also has two other modes available to the player, Adventurer, in which you control a single character in a roguelike experience, and Legends, where you can look up the vast history of your world. The generated world is persistent throughout all 3 modes, allowing you to build up a fort in one mode, explore it in another, and look up its history with the 3rd.
Fortress mode
As you might expect from the title of the game, Fortress mode is the main course of play in Dwarf Fortress. In this mode you are tasked with the founding of a new dwarven outpost. You're able to pick the location of your fort, the skills of the seven dwarves you embark with, as well as the items and livestock you choose to bring with you. Your choice of location largely determines what type of fort you end up making in addition to how challenging it may be. For instance, embarking in a desert allows you to focus on glass production while also dealing with the challenge of water shortages. Embarking near a haunted ocean, on the other hand, gives you access to unique beachfront property, though you must first fight off the zombie and skeletal fish that can walk on land.
After embarking at your chosen location the game opens up in a similar way to a sandbox game, offering the same sort of freedoms. There is no goal beyond "survival", and even the definition of that is left up to the player. As the (in-game) months and years go by players will gain access to more immigrants, expanding their fortress with new workers and nobles. Eventually the fortress will comes under the rule of a baron noble, and if you continue to expand, you might even attract a king, turning your fortress into the capital of your civilization. As you advance through the "noble foodchain" you'll also gain access to other game features, such as the justice system and dwarf run economy.
The mode itself features many options and tools available the player, allowing them to choose what direction they wish to take the fortress in. As you might expect from dwarves, they are very competent in digging, and you're able to mine out large areas for your living quarters whether you're looking for design or for effiency. There is also a realistic and robust industry system allowing you to focus on trade goods (such as stone crafts) and metalworks production, which allows for weapons and armor production. The military is also a huge part of the game, and you're able to outfit a militia to defend against goblin sieges and megabeast attacks.
The dwarves are the most important part of Fortress mode, serving as your workforce, military, and populace. Each dwarf is unique and comes to your fort with their own name, profession, and family. Dwarves also have their own likes and dislikes, preferences of food or pets, and even have thoughts of their own. These thoughts, such as "Admired a finely made bed recently" or "Was forced to sleep on the ground recently" serve as positive/negative modifiers to a dwarf's mood; too much negative, and a dwarf will throw a tantrum, taking out his anger on furniture and creatures. Strained dwarves push to their limits will eventually go insane, resulting in their own suicide or the murder of others.
Experienced players tend to usually work on what are called "megaprojects". These are projects of the most grand scale, usually involving many in-game years of commitment. Examples include giant pyramids, chasm-spanning bridges, towering statues carved out of the mountainside, and many more. Some players also prefer to focus their megaproject ideas of death traps, with more than one fortress developing a huge magma reservoir that is able to spill out into the countryside at the flick of a lever.
Though lacking a true end, it is inevitable that a fortress must crumble to its end, spawning the popular motto for the game, "Losing is Fun!" Seen as an ironic (albeit rather accurate) statement, both the players and developer alike have claimed that losing in Dwarf Fortress is the real "fun" of the game. This is in reference to the game's numerous ways a player can lose the game, such as from a goblin siege or accidentally flooding their fortress with magma. These losses are often what spawn the many unique and entertaining stories that have made Dwarf Fortress as popular as it is today.
Adventurer mode
Though not as fleshed out or as popular as the above Fortress mode, Adventurer mode serves as an interesting roguelike component to the game. In this mode you control a single adventurer (as a human, elf, or dwarf), and like in Fortress mode you have no real goal or end game. Your options are open, allowing you to slay megabeasts in caves or simply explore the countryside. Due to the complete freedom you are also allowed to do some rather despicable acts, such as slaughtering a peaceful town or setting fire to the forests. Everything you do in this mode is persistent, and anyone you kill remains dead throughout all modes.
Adventurer mode's orignal purpose was to explore old forts you created in Fortress mode. Once a fort crumbles to its end you can boot up an adventurer and find your fort on the world map. From there you can explore your old fort as if it was a dungeon, complete with loot and monsters. What appears in the fort is entirely dependent on your actions in Fortress mode; if your fort fell to a goblin siege then your adventurer will have to deal with goblins lurking in the halls. Likewise, items, especially artifacts created in fortress mode, all persist in adventurer mode, allowing you to create full suits of armor and weapons that your adventurer can later find and equip.
Certainly the most popular aspect of this mode is the sheer absurdity of the things you can do in it. For instance, you may wish to take off your pants and use them to beat a child to death. You could then wield the child's corpse as a weapon and kill the grieving parents. Settings fires to bushes, throwing rocks at guards, and jumping into rivers to wrestle fish to death are all commonplace in Adventurer mode, and it's usually enough to make up for its rough and unfinished feel.
Legends mode
Legends mode does not fit the criteria of a traditional game; indeed, you don't control anything in it at all. Instead, Legends mode serves as a log of sorts for the entire history of the world you generated, from year 1 to when it stopped generating. In it you can read up on various historical figures (great warriors, kings, or even common folk) as well as read an event log describing various wars, nation expansion, and megabeast (dragons, giants, etc.) activity. You can also view historical maps and watch as civilizations expand as cities are created and destroyed.
Though seen as boring to some, many feel the entire purpose and intent of Dwarf Fortress is to create an generated world full of interesting stories and historicial figures. Legends mode allows you to keep track of all, and serves as link between both Fortress and Adventurer mode. For instance, you may lose your fortress to a certain goblin warlord. By using Legends mode you'd be able to look up the warlord, find out his lineage, how many wars he had been in, and where he currently rules from, and from there you can take an adventurer to kill him out of revenge.
Simulation
Without a doubt, the area most focused on in Dwarf Fortress is that of simulation. Every creature, object, and even wrold generation is modeled in extreme detail and depth, especially compared to other games of similar nature. Creatures have realistic bodies that react to combat, allowing someone to have a leg chopped off or an eye gouged out, and these in turn have realistic ramfications, such as reduced mobility or blindness. All items are made up of their respective materials, so that a copper sword turns into molten copper when dropped into a magma pool.
Dwarf Fortress is full of small details that many players may miss. Fortresses near the coast will occasional experience gusts of air from the sea that will increase the power output of their windmills. Moss will eventually grow on stone and wooden structures that have existed for many years. These small details, when coupled with the larger ones regarding simulation, make for a very unique experience that few other games can rival.
Mods
Dwarf Fortress, though closed source, has always been open to modders. Perhaps the most popular of mods are the graphical overhauls which move the game away from the ASCII characters to 2D sprites. Mike Mayday's graphic pack is certainly the most used, offering unique sprites for job professions, creatures, furniture, and more.
There is also the ability to edit the "raw" files of the game, enabling users to modify existing creatures, civilizations, items, weapons, and more. Users can also add brand new raw entries as they see fit, allowing the player to add or remove any object or creature as they see fit.
Bloodline / Succession Games

Fanart from the most popular of all succession games, Boatmurdered
Dwarf Fortress owes much of its popularity to the idea of Bloodline and Succession games. These are not official modes of play, but rather, ideas that the users have stormed up to make the game more interesting. Usually in these games a player will take control over a fortress for a year, having complete freedom in shaping the fortress however they want. After the year is up they zip up their save and send it to another play, who also has a year with the fortress. These turns are often accompinied by detailed (and usually roleplayed) accounts of a player's year with the fortress, detailing the many events a player might run into.
The most famous of all succession games is Boatmurdered, a fortress done in the Let's Play forum of Something Awful. Other popular stories include Nist Akath, on the official forums, and Headshoots, another Something Awful fortress.