Can someone explain to me in as simple a manner as possible how a modern day person of Scottish ancestry is able to work out what clan, family and tartan they descend from?
Once families left Scotland marriages didn't always follow within the clan they once strongly supported.
I have come across records where the husband took the wife's family name as she was the sole heir to estates etc and the name would have otherwise been gone.
Is it the male line that is maintained or do some names take precedence over others?
Abygail
The first thing to note is that the majority of Scots did not ever actually belong to a clan. The clan system was a feature of society in the Highlands and Islands, not in the Lowlands, which was always the most populous part of the country.
There was no requirement to marry within the clan you were born in. Generally inheritance went down the male line, though as you have found, brotherless heiresses sometimes married men who took their wives' names.
I'm afraid the Brigadoon industry has peddled a huge amount of disinformation about clans and tartans over the years. For instance, you can consult lists which tell you that if your surname is Taylor you are a member of Clan Cameron. This is obviously nonsense, because the surname Taylor is an occupational surname which would have arisen independently all over the English-speaking world. Just because there were a lot of Taylors among the adherents of Clan Cameron is a long way from meaning that everyone named Taylor is descended from Clan Cameron.
You will also find that if your surname is, say Adamson, you belong to Clan Gordon, Simpson to Clan Fraser and so on. These are based on the prevalence of the given name Adam among the Gordons, and Simon among the Frasers. A moment's thought will tell you that both Adam and Simon are biblical names occurring all over the Judaeo-Christian world, and that there must be legions of sons-of-Adam who have nothing to do with Clan Gordon, and sons-of-Simon with no connection to Clan Fraser.
Most Lowland Scots in the 15th, 16th or 17th centuries probably regarded Highlanders as dangerous savages and would have been horrified at any suggestion that they were connected in any way to a Highland clan. Most modern Scots are not much interested in whether or not they belong to a clan, and if so which one. If you have a genuine clan surname, like MacDonald or Cameron, then you belong to that clan. If, on the other hand, your surname is Clark, or Brown, or Hill, or Thomson, you might have a clan affiliation if your mother, or a grandmother, or some other ancestress, had a clan surname, but the chances are that you have no connection through your male line.
There are also clan associations formed in relatively recent times around non-Highland surnames, such as Scott, which is in fact a Borders family, not a Highland clan.
If you are serious about your own genealogy, forget about clans and tartans unless and until you find that you definitely have an ancestor who can be proved to have been a member of a particular clan.
As for tartan, almost every design available today is a 19th century invention. If you want to wear a tartan, just pick one you like and get on with it. There are no laws saying that you can't wear any tartan you like, there is no tartan police, and no-one will take any notice which tartan you are wearing, even if they could recognise and name it, which is unlikely.
I have to go back to my great-great-grandmother before I find a Highland clan name in my ancestry, and I have to go back to my great-great-great-great-great-grandmother to find a direct ancestor with a surname beginning with 'Mac'. Yet every single one of my forebears was a Scot, born in Scotland, brought up in Scotland, married (apart from two couples) in Scotland, brought up their family in Scotland and died in Scotland. I do not, and never have, regarded it as either necessary, or relevant, or even interesting, to work out whch clan I might belong to, and I assure you that I am not at all unusual in that.