What does an apostrophe in a name mean? Examples: D'Artagnan - The Three Musketeers and F'lar - Dragonflight?
It usually means the name is a contraction of something longer.
An apostrophe is usually used in these types of instances to indicate that the word has been contracted.
For instance, English commonly abbreviates the word "not" following some verbs, such as:
Did not = didn't
Can not = can't
Will not = won't
and so on.
Sometimes in fiction (and within that grouping it happens most often within the Fantasy genre), the apostrophe is used to make things look more exotic and to introduce unusual names. "F'lar" is one such example. According to the Pern Wiki, his full name is Fallarnon (and the abbreviation of names is said to be a cultural tradition of the dragonriders).
With the name D'Artagnan, we have sort of the same situation but with a bit of a historical twist. D'Artagnan's name from The Three Musketeers was taken from a real life man, Charles de Batz de Castelmore d'Artagnan (who was Captain of the Musketeers of the Guard and died at the Seige of Maastricht in 1673).
In French, the word "de" means "of", and so literally the name means Charles of Batz of Castelmore D'Artagnan.
It turns out that D'Artagnan, when he was a young man and went off to seek his fortune in Paris, opted to use his mother's last name, which was the very well known and impressive D'Artagnan, and not his father's name (well... sort of. His father was a newly made noble who'd bought his title - he was a merchant originally - and was given the name De Batz. And so Charles used it... but just not in the place of honour).
So D'Artagnan is a family name.
Ok - so what's with the apostrophe here? In French, contractions sometimes happen to make things sound better (pronouncing a vowel next to a vowel can get awkward - thanks to @MeneerNask for catching this). Here, without the contraction, we'd have De Artagnan, which if you say it out loud sounds a bit awkward. And so the contraction is used to make things simpler to say it - D'Artagnan.