My latest project is a steampunk novel entitled The Demon of Butcher's Row, and in light of this it seems like a dandy time to go over exactly what the heck steampunk is. It's one of those weird little subgenres of science fiction and fantasy that seems to be making a minor resurgence these days, but it has a couple of cousins with which is is occasionally confused.
So, to start: what makes a work steampunk? Steampunk is any work that takes place between 1850-ish and 1910-ish that combines historical details with science fiction elements. A lot of early science fiction would be considered steampunk today, simply because it was contemporary to that time. Of course, modern steampunk tends to use the Disney version of Victorian England, polishing away the grittiness of the era to something that Phil and Kaja Foglio have called Gaslamp Fantasy. True steampunk embraces rather than ignores the dirty underbelly of Victorian society, much like cyberpunk does with its near-future societies. Of course, the full spectrum of gritty-to-shiny encompassed in steampunk ranges from A League of Extraordinary Gentlemen to Girl Genius, so the reader is free to choose how they like it.
So why is it called steampunk? A lot of the tech used in steampunk fiction is based on steam technology, the main source of power under development and thus takes place right on the leading edge of the Industrial Revolution. Unfortunately, in real-world terms, steam and coal turned out to be a technological dead-end, so many steampunk works handwave this with an element of magic or occult assistance. Since we sci-fi nerds love our cool gadgets, a lot of modern steampunk works will be heavy on the awesome dingbats and light on explanations of how sustainable they are.
Magic in a steampunk setting may come in many forms, if it is used. The
main interest of the society of the day was occultism and spiritualism,
in particular communicating with the spirits of the dead or generally
contacting other worlds. As such, a steampunk spellcaster may find
himself called upon to summon or communicate with beings from the
afterlife of distant planes, or else to identify and clean up after a
supernatural menace that some nimrod called up and couldn't control.
There may also be some overlap with alchemy, using quasi-scientific
processes to transmute Substance A into Substance B, or to bind
elemental forces in ways that augment the technology of the setting (see
above). Magic can also cover the ways that certain
scientifically-minded individuals can do inadvisable or flat-out
impossible things with Science, in much the same way that Dr.
Frankenstein was able to create a human being out of spare parts and a
nebulously-describe process, Dr. Jekyll was able to unleash his own dark
side, or the average Igor in the Discworld universe is able to
generally tell the laws of physics to sit down and shut up.
Gender roles in real-world Victorian society were strictly regimented. Women were often the property of the nearest male relation or husband, and typically were not allowed out and about without an escort, to prevent the potential sullying of their honor. By contrast, women in steampunk works are often in active roles in the story beyond damsels in distress. They may work as spies for the government, assassins, spellcasters or other subtle roles which wouldn't be considered ladylike. This can set them up in a contrast against male characters, such as male intellectuals vs. female intuitives, male bruisers vs. female persuaders, or obvious male menace vs. subtle female menace. Of course, their active role has a darker side, as it may be caused by or result in a female protagonist being put into greater danger--and if she can't defend herself ably from the start she better learn in a hurry.
Steampunk can be a fun genre to read and write if you're interested in that general time period and really dig the idea of beating history over the head with the spec fiction stick. When done well, it is a fun look at what might have been, if technological advancement had taken a left rather than a right. You might even have read some steampunk without knowing it, as much of H.G. Wells and Jules Verne fits tidily into this category, as do some of the later Discworld novels, as mentioned above. Done badly, though, it can easily turn into an anachronistic, incomprehensible mess (though I won't name any names). Like with most of the smaller genres, my best advice for a hopeful steampunk author is to start with the classics and find your way from there.