King William III was the grandson of Charles I (who was beheaded during the English civil war that sent the "Cavaliers" to the Virginia colony). Being royalty did not automatically mean becoming king, however. William ended up being an English king - instead of a "significant other" to an English queen - because
Despite the history of warfare, in 1677 Charles II was influential in arranging the marriage of his 15-year old niece, Mary, to 27-year old William. She had stayed a Protestant, unlike her father James, and at the time Charles II needed to deflect concerns over his Catholic tendencies. [Perhaps all really is fair in love and war...]
James II became king when his brother Charles II died in 1685. In that year Louis XIV of France revoked the Edict of Nantes, which had protected France's Protestants. This revocation triggered the flight of Huguenots (French Protestants) to the English colonies in America and increased fears among English Protestants about James II, a Catholic. The English Protestants were also concerned that James II would reduce the rights of Parliament, so they forced him to abdicate after only three years.
William and Mary replaced her father (James II) in the Glorious Revolution of 1688. In 1694 Queen Mary died, so William's precautions about being crowned king ended up being significant. Had he not been crowned as king, Mary's sister Anne would have succeeded immediately to the throne in 1694 and Williamsburg may had had a different name when it was founded in 1699.
Instead, she had to wait another eight years as "Princess" Anne until William died in 1702 (after breaking his collarbone in a fall from a horse and getting a "inflammation of the lungs").
During those eight years, King William did maintain a working relationship with Princess Anne, but she referred to him in private as the Dutch monster. Parliament also did not appreciate his Dutch and Huguenot allies or - surprise! - his demand for taxes to support war against France. At one point, after his Dutch troops were forced by Parliament to leave England, King William considered abdicating and returning to Orange.
King William was on the throne in 1701 when a new county, named after him, was created from King and Queen County. The Virginia aristocracy was just coming into full bloom, and had "thrust out" Governor Andros three years earlier in some hardball politics led by the Bishop of London's representative in the colony, Commissary James Blair.