House-elves are small humanoid creatures who inhabit large houses belonging to wealthy Wizarding families. They are “bound” to the family of the house, which means they do all manner of menial tasks for them until they die. House-elves are apparently very happy with this arrangement and consider it a matter of pride that they serve faithfully and do not betray their families.
A house-elf is a short creature with large bat-like ears and enormous eyes. It is difficult for an inexperienced human to tell the difference between male and female house-elves, although the females generally have higher, squeakier voices (GF8). Neither male nor female house-elves wear clothing (and they would consider it shameful to do so); instead, they cover themselves in towels, tea cozies, or pillowcases. If their owner gives them an article of clothing, it breaks the "enslavement" and the house-elf is free. For most house-elves, this would be the ultimate insult and they would be shamed forever.
There are over a hundred house-elves at Hogwarts, the largest number in any dwelling in Britain (GF12). They lay the fires, do the laundry, light the lamps, and do countless other such tasks. The house-elves are also the chefs of the castle and they create wonderful meals in the huge kitchens.
The role or function of the house-elves is very important. They hear and see things, as Dobby said (GF26) and can use their powerful magic and this information for doing bad (Kreacher), neutral (Winky) or good (Dobby).
A house-elf named Dobby, who served the Malfoy family, took a more enlightened view than most. He desperately wanted to be free and eventually Harry Potter managed to trick Lucius Malfoy into giving Dobby an old sock. Dobby has since come to work at Hogwarts, where he actually receives payment for his labors (GF21).
Dobby has huge, green, tennis ball-sized eyes and a long thin nose like a pencil (CS1, CS2). He is quite short, like all house-elves, coming only up to Harry's navel (GF21). He is devoted to Harry Potter and also to Ron Weasley, who he refers to as Harry's "Wheezy." Dobby is particularly fond of socks and has begun using his earnings to buy yarn and knit them himself (GF23).
Note that as long as Dobby was the slave of the Malfoys, his attempts to help Harry failed: cf. the stolen Owl Post, the closed magic portal leading to Platform Nine-and-Three-Quarters, the enchanted Bludger (CS1, CS2, CS5, CS10). Dobby tried to protect Harry in the wrong way. But after Harry Potter managed to trick Lucius Malfoy into giving Dobby an old sock, Dobby was free and used his own powerful magic against Lucius Malfoy and knocked him down a flight of stairs (CS18). When he's working at Hogwarts, his actions really helped Harry (cf. he gave Harry Gillyweed to breathe underwater (GF26), he explained how and where Harry could find the room of requirement (OP18) and warned the members of the DA when Umbridge discovered their secret (OP27).
Winky, a female house-elf who until recently worked for the Crouch family, has enormous brown eyes and a nose like a tomato (GF8, Winky's mother and grandmother were also Crouch family house-elves (GF21, GF9). For years, Winky took care of Barty Crouch Jr., who was held in the Crouch residence under the Imperius Curse. Barty Crouch Sr. sacked her when she was found holding a wand at the Quidditch World Cup, which not only publicly associated him with Dark magic, but demonstrated that her guardianship of his son might be unreliable (GF8, GF9, GF35). She has come to work at Hogwarts, but she is in total disgrace and has taken to sitting on a stool by the fireplace and getting drunk on butterbeer. Her distress at the death of the last members of the Crouch family hasn't helped (GF21, GF28, OP18, GF35).
Kreacher is an aged old house-elf whose ancestors have served the family of the Blacks for centuries. He is nasty and rude to the current inhabitants of the house, number twelve Grimmauld Place, and doesn't do much actual upkeep. He is devoted to the mother of Sirius Black, who died in 1985 [Y5] but whose portrait still shrieks orders from the wall of the front hall of the house. Kreacher tried to stop the members of the Order of the Phoenix from throwing away the many dark magic items with which 12 Grimmauld Place was filled, even going so far as to rescue some of them, which might be very important later (OP4, OP6, OP9, OP23). When accidentally given leave by Sirius, Kreacher went to the home of a family relation, the Malfoys. There he gave much away about Sirius and the Order (OP22, OP24, OP32, OP37). He was inherited by Harry and now lives at Hogwarts (HBP3, HBP19). After Harry and Kreacher make amends through the gift of Regulus' fake locket, Kreacher is inspired to help Harry Potter defeat Voldemort. He, with the help of Dobby, rallies the house elves to fight in the Battle of Hogwarts.
As the case of Kreacher shows, it's very important for the wizards to know if their house-elf is really loyal to them or not, because these creatures see and hear things, and can collect information and eventually use it against their masters.
House-elves have a very powerful magic all their own, magic which requires none of the types of focusing tools (wands or words) that Wizard magic requires. Dobby used his magic to enchant a Bludger, to close the magic portal that leads to platform nine-and-three-quarters, to interfere with Owl Post and steal someone's letters, and to knock Lucius Malfoy down a flight of stairs. He also can disappear at will, which would seem to be a form of Apparition, but a form which can be done within Hogwarts, where, as Hermione constantly reminds Harry and Ron, normal Wizarding Apparition is simply not possible. All of these are very powerful charms.
Unfortunately, as long as they're enslaved, they aren't likely to be using this magic for anything but their mundane work. Hermione Granger is working to bring enlightened thinking to the house-elves at Hogwarts, so far with very little success.
House-elves are derived from creatures called brownies or hobs in folklore:
A hob is a type of small mythological household spirit found in the north and midlands of England, but especially on the Anglo-Scottish border, according to traditional folklore of those regions. They could live inside the house or outdoors. They are said to work in farmyards and thus could be helpful, however if offended they could become nuisances. The usual way to dispose of a hob was to give them a set of new clothing, the receiving of which would make the creature leave forever. It could however be impossible to get rid of the worst hobs. (Wikipedia)
In some parts of Britain, hobs and brownies are called "dobbies."
Discussants on Episode 4 of the Mugglenet Academia Podcast considered the issue of house-elves as slaves and metaphorical connections to historic and modern civil rights debates. The discussion of "elf rights" recalls Hermione's work with S.P.E.W. and JKR's non-canon comments that Hermione pursued a career in wizarding law. There is a very interesting FanFiction on the Mugglenet website exploring Hermione's future career and a particular case of a house-elf accused of murdering her master. Further, Dr. Katie McDaniel has discussed her thesis proposing that house-elves are analogies or representatives of house-wives in the Wizarding World and thus aspects of the feminist threads in JKR's writing on the Mugglenet Academia Podcast. --Hufflepuffskein