Mordenkainen's Tome of Foes goes into heavy detail on the nature of the dwarven clan, describing the clan as "[…] the basic unit of dwarven society, an extended family that dwells together".
On the topic of marriage, however, it says: "marriage is a sacred rite among the dwarves, taken very seriously because it requires two children to move away from their homes to start a new family in the clan", and that Berronar Truesilver's priests arrange marriages "to ensure that each generation of a clan is stronger and more talented than the last" (emphasis mine), possibly implying these are dwarves from separate households/branches within the same clan branching off to start a new family within the clan. It also says that "a clan is led by a king or a queen who sits at the head of a noble family", when those are titles I generally associate with an entire city/kingdom's leader.
The book does not particularly go into the nature of dwarven cities (focusing on the nature of strongholds instead), or go much into the nature of interactions between clans. I take from the above that it is typical that a dwarven city belongs to a single clan; Sword Coast Adventurer's Guide implies at least that this is certainly the case sometimes, mentioning Thornhold belongs exclusively to Clan Stoneshaft, and mentioning that Mithral Hall was the ancestral home of a particular clan.
Does this mean that dwarven clans are of extremely extended families, given the implication that they mostly interact/marry off within themselves? (And if so, do they tend to have different last names in order to distinguish the branches from one another, or do they all share the clan name, as the PHB's Dwarf Names section implies?) Or are some of my assumptions incorrect, and interacting with/marrying into other clans is more commonplace than Mordenkainen's Tome of Foes implied to me?
To clarify, the impression I have from reading these two books is that clans have the overall population of up to a small city and therefore have enough diversity/separation to support intraclan marriage as the norm, but there's not quite enough in the books to leave me certain that that interpretation is correct.
(Answers using lore from other editions are acceptable, so long as there's no reason to believe it is no longer valid.)
Best Answer
Let me preface this by saying the while I have Mordenkainen's I have not read this portion, and the following is based on 20+ years of reading novels and the such based in the Forgotten Realms.
Dwarven Clans are loosely based on the concept of Scottish Clans, and should be seen more like tribes than a large family group. A Clan is a collection of loosely related families, wherein one family has prominence as the the head and protector of the group. The Clan is typically named after the head family but exceptions exist.
Strongholds and cities are functionally the same thing for dwarves and are treated like nation City-States. He head of the Clan is a King and future leaders typically come from his bloodline. Families are loosely related to one another but the larger the populace is the more diverse this can become. But typically this strongholds host more than enough of a population to marry completely internally, and indeed many strongholds were isolated from one another for long periods of time.
WARNING: Spoilers ahead for some of the Drizzt series.
Mihtril Hall is a good example of this in action. Clan Battlehammer were the ancestral occupants of the city, but were driven out and at some point (and suffering significant loss of population) migrated north to Icewind Dale. They remained isolated from other dwarves for 200 or so years before they managed to return to Mithril hall. So in this time they would have had to marry exclusively internally.
Clans typically did not live with other Clans in a single city, but places like Mirabar would have individuals from several Clans, but observed a different government type (the city was shared with humans as well).
As for surnames, individual dwarven families had their own names, which may or may not indicate their Clan. Bruenor Battlehammer was the King of Clan Battlehammer, and his family was the head of the Clan for generation unto that point, however he passed the Kingship down to his next of kin Banak Brawnanvil, who was his cousin but not part of the head family, his heir Connerad Brawnanvil would sometimes add Battlehammer to his surname for formal events (as he was related by blood to the head family), but mostly kept his primary name. At this point the main bloodline not longer existed, but the Clan remained Battlehammer, despite no Battlehammers existing within it.
All dwarves of the Clan would consider themselves as "Battlehammer Dwarves", e.g. Banak Brawnanvil of Clan Battlehammer. So their Clan was also their national identity.
TL:DR
Clans are collections of loosely related families, or families with a long shared history (similar to tribes). They became City-State Kingdoms and had populations capable of self-sustaining but also intermarried with other clans. Clans typically did not share cities, and individual families often had their own surnames, though the Clan had the name of the head family.
Sometimes families would also refer to themselves as a clan, so that can become confusing. Also I can not think of any specific inter-clan marriages, but I would assume they do happen, but intra-clan marriages certainly seem to be the norm.
Additional Note: It should be noted that sources like Mordenkainen's are setting-agnostic and as such would only have the most basic concepts of the culture for any specific race. Dwarves had cultural differences between different sub-races, and especially between different settings. The information provided in my answer is Forgotten Realms Shield (Mountain) Dwarf specific. Setting specific info may also contradict information provided in more generic sourcebooks.