Little people—human-like beings of short stature but usually immensely strong—are common in mythologies all around the globe. However, dwarfs—characterized by their short stature, their great strength and their association with caves, mine-workings and underground realms in general—are a creation from Nordic legends.
Often bearded and axe-bearing, dwarfs (only J.R.R. Tolkien dare to use dwarves as plural for this group) are among the commonest companions in fantasy fiction. Always the side-kick, never the hero, dwarfs, although worldly-wise and fierce, are preferred as staunch allies than as protagonists. When cast in a main role, it is generally in the one of deadly foe.
Gnomes, goblins, lepreachauns, duendes and such are all variant kindred, popular among fantasy writers. Literature-wise, Tolkien's dwarfs, whose ancestors hewed out the deep dark Mines of Moria and created imperishable armor and weapons for the elves, are archetypal and unforgettable, but many others have made their mark in books and movies before and after. David Pringle, editor of The Ultimate Encyclopedia of Fantasy and I agreed on a few of them as our favorites. First in the list is Otter, a one-meter-tall black mighty warrior capable of crushing men and beasts much bigger than him, and who plays a major role in Rider Haggard's The People of the Mist (1894)—it turns out, that among an African lost race, Otter is the living image of their god, and they worship him accordingly. There is also Tomb the Iron Dwarf from M. John Harrison's A Storm of Wings. Tomb is a tough scavenger of ancient technologies who constantly reminds himself that he's "a dwarf and not a philosopher."
Not in literature but in movies, Willow is a dwarf worth remembering, as he represents one of those few instances where the little guy carries the story while the hero-type is the companion. Willow, the movie, was release in 1988. Directed by Ron Howard, produced and with a story by George Lucas, recounts the adventures of Willow, the dwarf, as he reluctantly agrees to protect a special baby girl from a tyrannical queen who has vowed to destroy her and take over the world.
Mythology-wise, Norse and Germanic legends seem to be the ones that shaped the image of dwarfs as we generally know them today. In Germanic mythology, dwarfs were portrayed as human-shaped, dwelling in mountains and in the earth, extracting and working the ore, crafting all that is made of metal. In ancient Germanic texts, Dwarfs are sometimes described as short and ugly, although there's reason to believe this a later development stemming from medieval times, when comical portrayals of dwarfs became common.
Now, Norse Mythology provides, by far, most of the mentions to dwarfs before and during the Middle Ages. Nonetheless, some of these mentions contradict each other, providing with differing origins for the race.
For example, in the Poem Völuspá of the Poetic Edda (a collection of Old Norse anonymous poems compiled in the 13th century from earlier oral sources) explains that Dwarfs came to exist from the primordial blood of the being Brimir and the bones of Bláinn. On the other hand, the Prose Edda (also known as the Younger Edda, an Old Norse work of literature written in Iceland by Snorri Sturluson in the 13th century), describes dwarfs as beings similar to maggots, born by festering in the flesh of Ymir before being gifted with reason by the gods. Together, the Poetic Edda and Prose Edda contain the name of over 100 dwarfs, an many more explanations as to how they came to be, but only it's only in the Prose Edda where the four dwarfs Norðri, Suðri, Austri and Vestri—Old Norse for North, South, East, and West—have a cosmological role, holding up the sky upon the Yggdrasil.
Other cultures also have legends about different races some of which include human-like beings or short stature. Menehune, a mythological dwarf race found on Hawaiian tradition, are said to had lived in the archipelago before the arrival of the first humans. In that pre-human period, Menehune inhabited the deep forests and hidden valleys of the Hawaiian Islands, where according to legend they survived even after the first humans came to the island, but also the coastal areas where they built temples (heiau), fishponds, roads, and houses of superb craftsmanship. Is because of these remnants that humans came to know of the existence of the Menehune.
-Pringle, D. (Ed.). 2006. The ultimate encyclopedia of fantasy. Carlton.