General disclaimer: I play a fairly heavily modded version of DF, which includes the excellent All Races Playable mod. All non-dwarf content is based, of course, on my experiences with the same.
As a general rule, the race I play defines what manner of settlement I work on setting up and the primary defensive works of the settlement.
For example, I try whenever possible to settle Dwarves in such a position that there's a significant cliff-face to carve into; in fact, my Dwarves almost always settle with access to a volcano, because I can't be bothered with traditional wood-burning metal industries. The entrance is always several layers below the highest point at which the magma/lava fills the volcanic tube, and the layer immediately above is usually reserved for a series of magma channels with lever-linked hatches for use as murder-holes. The layer above that is typically reserved for trade good manufacturing and storage. As for the entrance itself, it is rarely more than 3 tiles wide, regardless of whether I'm lazy and run a straight path or decide to put a few twists and turns in it; the idea is that it's just wide enough for a merchant to get his wagons to my depot (just outside the outer gate), but narrow enough to be able to send a melee squad to repulse attackers without fear of them getting surrounded. If I'm honest, I rarely ever employ the murder-holes, just because the rarity of attacks on my fort mean I'm more eager to pit my dwarves against incoming foes rather than deal with them in a more controlled-yet-hands-off manner.
Regardless, the depot typically has a series of six deep alcoves (three either side) in which I chain three hunting beasts and three war beasts, mostly to release against potential thieves, but also in the event that I need to loose them on attackers. The depot chamber itself follows a similar philosophy to that of the entryway tunnel: just big enough for the trader, or in this case the depot, at 5x5. Also traditional in my builds is another long hallway leading from the depot to the true entrance to the fort itself. The first proper gate* is always fort-side of the depot, such that the gate can be sealed if needed but merchants can still attempt to come and go if they're dumb enough to show up in the middle of hostilities or just before them. In the same vein, of non-interference with traders, the first defenses on the level are typically two or three rows of cage traps on either side of the outer gate. From this point, there is another length of 3x(X) tunnel, where (X) is the length as primarily determined by how much time I have on my hands before my dwarves are in danger of starving to death or dehydrating, again for the purposes of tying up invaders in a tunnel fight. This tunnel terminates with an optional second gate before opening into a large V-shaped chamber no less than 20 tiles long from the narrowest point to the shortest. The widest end is always carved into fortifications at the earliest opportunity and is the site of the marksmen's barracks. Passage into the fortress proper is only possible through the marksmen's barracks. As such, the function of the second gate is less for repelling attackers and more for trapping them in the killing chamber to be potted at will by marksdwarves, with possible melee support. The marksdwarves' barracks almost always begins its existence as a single chamber before being expanded into a complex including as many as possible of those industries and ancillary structures which support ranged combat. Commonly, but not always, the first melee barracks adjoins the ranged one, though whether adjacent or on the next level below is dependent on how much space remains available after the completion of the aforementioned outer defensive works, killing chamber, and ranged troop complex. One thing is always true: the rest of the fort can only be accessed once one has passed through both barracks complexes to reach the Grand Stair.
The remainder of the fortress is then laid out more or less organically based on the events that occur and the needs of the fort. Grand, spacious, and open chambers are not uncommon, but chokepoints and defensive works figure heavily into the design of my dwarven forts ever few z-levels or wherever else it seems appropriate. Any point that even looks as though it might represent a vulnerability to the fort's defense is kept under watch with guardhouses and similar sorts of fortifications; this is particularly true of any well rooms, as I discovered early on in my DF career that even if enemies won't show up at the main gate, you can never be sure what's going to find its way in from the caverns by way of a poorly-defended well.
*Gates are, of course, bridges in DF's terms. Honestly, I think I've only ever used bridges as bridges all of about... a half dozen times, maybe?
By contrast, human settlements tend to vary widely based on whatever cultural theme I've assigned them. I've actually yet to do a proper castle build, with the majority of my human forts taking on something of a cue from historical hill-forts with a bit of motte-and-bailey styling to them. These I tend to situate near rivers where possible, such that they can be manually diverted into a moat with fairly minimal effort. Due to how time-, labor-, and resource-intensive such builds are, the actual defensive works are laughably primitive and typically consist of a simple drawbridge and gatehouse, attended by towers at arbitrary intervals. If I can be bothered, I construct fortifications at the top of the walls, and a platform around the inside on which archers can stand, but frankly... it's usually far more of a p.i.t.a. than it's worth.
I've also experimented with a variation of this plan wherein I settle humans at a river junction, or perhaps more accurately, on top of one, in such a way that the settlement resembles a fortified tower surrounded by the river itself which has been expanded as much as possible without toppling the tower into the flow.
(Oh Armok, I'm running out of time to detail all this. I have to leave for work soon. Please excuse the abbreviated explanations.)
Goblin settlements also tend to be built into cliff faces, riddled with traps (following the "don't block the merchants' path exclusion, of course), but are notably different from dwarven settlements I design in that they are defended by chasms and retracting bridges. After putting in all the time to engineer such affairs (typically by excavating the lower levels and then dropping the uppermost on all the lower ones, of course), I should like to think that the goblins typically caper around the precipice of the pit and cackle at any creature who's fallen 20 or so z-levels to be crippled if not outright killed.
Please forgive the lack of pics, I've only just got updated to the most recent version and got the mods re-installed over the top of them. If the thread's alive long enough for me to get a decent example of each, I'll return with demonstrative images. Please also forgive the increasingly-abrupt explanations for all races other than the dwarves. Like I said, I have to leave for work soon, and am rapidly running out of time.
I look forward to seeing what you all have to say, and looking at your varying design philosophies.