For those who don't know, 王 literally means "king", and is apparently the most common surname in the world (RIP me). From what I understand, some families do have distant connections to royal bloodlines, but that can only account for a tiny percentage of the population. Did a huge population of peasants just adopt 王 to try and elevate their status?
(Would also appreciate some background on Chinese surnames in general if possible! I was inspired by a recent post about Anglo-Saxon vs Norman surnames in the British Isles.)
The earliest (official) record of the surname "Wang" comes from 《新唐书·宰相世系表》, a publication from the Tang dynasty, which chronicles royal lineages from the Eastern Zhou dynasty. There may have been informal or verbal records of the surname which predate this record, but I am not aware of such.
In 《新唐书·宰相世系表》, it records a royal prince ling by the name of 姬晋 (Prince Ji of Eastern Zhou) who was born around 567 BC. He was in line to inherit the crown, and was favored by the court. Relevant passage: " 王氏出自姬姓,周灵王太子晋以直谏废为庶人,其子宗敬为司徒,时人号曰‘王家’,因以为氏。 "
However, at some point, he made a mistake and fell out of favor from the court. The records do not say what the exact mistake was, but some historians think it may have been slander against his father. (For reference, "直谏" is a crime which means "advise frankly", which is generally a roundabout way of saying stuff you shouldn't be saying during court). Regardless, he was demoted to peasantry and had his royal titles stripped.
As by custom, he can no longer keep his royal last name, and was therefore forced to adopt a new one. He was still popular among his own estate, however, and so his descendants, estate, and former subjects chose to take the name "Wang", which, as you surmise, means "King". Due to his status as the former crown prince, this was a way for his immediate descendants to reclaim some of the legitimacy.
His family and descendants thrived, and perhaps being stripped of his royal titles helped his descendants survive the coming of the Qin dynasty (speculation).
The next time the Wang name is mentioned in history prominently was from 《太史公记》 ,from the name "Li Wang", who was a fairly accomplished general towards the end of the Qin dynasty. After the Qin dynasty ended, Li Wang sent his two sons to two separate parts of China, far away from each other, in order to flee the coming Han power struggles. His two sons, Yuang Wang and Wei Wang, fled to Shan Dong and Shan Xi, with a significant amount of wealth, and established their own estates. They also established their own separate family records, and is the earliest record we have of the Wang family clan records. Afterwards, the Wang family once again thrived.
This is the official origin of the Wang family name, using historical primary sources.
Now - before someone comes to me and tells me that there are records which pre-date the Zhou dyansty - yes. In《通志·氏族略》, there are mentions of "Wang" family from all the way back in the Shang dynasty. But that record also references a bunch of stuff from folklore and we shouldn't take it too seriously.
I should also mention that there are other, independent bloodlines also with the name "Wang", phonetically similar but from different origins. There is a Xiong Nu clan which also used the name "Wang" from eastern Han, as well as some Mongols clans with phonetically similar names. After thousands of years of inter-marriage and assimilation, it is likely some modern Chinese from the Wang family derives their bloodline from these tribes.
With regards to your request about other surnames, I can't promise all will have an interesting or clear history, but if you have a name you'd like to know about, let me know.
Also, for fun, you can try looking up your name in the Wang clan records. There are 4 separate clan records for Wang family records in Henan, Sichuan, Shanxi, and Shandong.
If your name has 3 characters, you can try to match up your middle character to see what your position is in the lineage. If you can find it and match it, congrats - you're probably an actual, bonafide descendent of the royal Wang bloodline, along with like 100 million other Wangs.
If your middle character does not match, or your name has 2 characters, don't fret, chances are you got your last name from a female descendant of Wang. In which case, you'll have to dig around for your parents' names, and their parents' names, all the way up.