It is told in The Silmarillion that the Vala Aulë created the Dwarves because he was impatient for the arising of the Children of Ilúvatar (Elves and Men). He created seven Dwarves, and was teaching them the language he had devised for them (Khuzdul) when Ilúvatar confronted him. Aulë offered his creations to Ilúvatar, who accepted them and gave them life.
However, the Fathers of the Dwarves had to wait until the Elves first arrived, and Aulë laid them to rest in various places in the continent of Middle-earth.
The Dwarves were created in ancient times by Aulë, one of the Valar. Aulë was a smith and a craftsman and he wanted to teach his skills to the Dwarves. He made Durin first and then six others. But Eru had intended the Elves to be the Firstborn race so he commanded Aulë to put the Dwarves to sleep until after the Elves awoke. Eru gave each of the Dwarves their own souls so they could exist as independent beings. At first, when Eru had scolded Aulë for his creating the Dwarf Fathers, Aulë was going to destroy them, but Eru stopped him, noting that they now had their own souls. The Dwarves are thereby the "adopted Children" of Eru.
Each of the Seven Fathers founded one of the seven Dwarf clans.
Durin I was the eldest of the Seven Fathers of the Dwarves, and the first of his kind to awake in Middle-earth. He awoke in Mount Gundabad, in the northern Misty Mountains. Durin I belonged to what later became known as the clan of Longbeards.
Two others were laid in sleep in the north of the Ered Luin or Blue Mountains, and they founded the lines of the Broadbeams and the Firebeards who later lived in Nogrod, Belegost, or both, in the Blue Mountains The other four Fathers of Dwarves were laid down in the far east in two locations, separated from Gundabad and each other by distances at least as great as that between the Ered Luin and Gundabad. These founded the lines of the Ironfists and Stiffbeards, and Blacklocks and Stonefoots. No Dwarves of these lines appear in the tales; however, as noted below, the Longbeards may be formed out of Dwarves from all lines, and Dwarves from Durin's Folk may therefore have ancestors from these other lines. During the War of the Dwarves and Orcs, forces from all clans took part in the fighting under the Hithaeglir, at the request of Durin's Folk. Just before the War of the Ring Dwarves from these lands likely fled to the Blue Mountains out of the east: "But now Frodo often met strange dwarves of far countries, seeking refuge in the West". The Dwarves of Erebor and the Iron Hills were known to have remained in their lands before and during the War of the Ring.
Of the Fathers of the Dwarves, only Durin is said to have "lain alone". This can be interpreted as referring to the fact he was indeed laid down to rest alone while the other Fathers were laid to rest in pairs, but older versions of the story suggest that it meant Durin alone had no female companion. The other Fathers did: references are made by Tolkien to the "Thirteen Dwarves" created by Aulë (Durin and the six pairs). By this version of the story, Durin's Folk were formed out of Dwarves from the other six lines, as a mixed people arose when all Dwarves went to Gundabad.
After the end of the First Age, when the ancestral homes of the Broadbeams and Firebeards were ruined, many dwarves from these clans crossed Eriador and merged with Durin's Folk in Khazad-dûm, although remnants of these two western nations may well have survived as independent entities in the Ered Luin; seven rings were given to 'the Dwarf Lords' by Sauron in the Second Age, for example, and certainly the Blue Mountains remained permanently inhabited by dwarves of one clan or another throughout the history of Middle-earth: Thorin Oakenshield, for example, grew up there as an exile from his homeland Erebor, and several of his companions on his quest to reclaim that realm were not related to him (Bifur, Bofur and Bombur).