Answer:
This is a matter of ‘where’ one would like to be King/Queen or sovereign.
Other answers have rightly pointed out that in the British context:
(a) One can become a Queen consort (simply and legally: “wife of a King”) by marrying one or being married to one at time of accession. Just as Kate Middleton has done.
(b) One can become King by being in the line of succession as determined by the British Parliament, under the Act of Settlement 1701 and inherit.
(c) If this were the middle ages, one can build an army, gain the support of the peers (titled/landed lords), gain some popular support, have the ascent of other powerful countries, and overthrow the existing sovereign. But that is not going to happen and realistically could not happen since the time of William and Mary.
In the British context, we might add a fourth:
(d) One could convince Parliament to amend the Act of Settlement 1701 to have one inserted at the top of the line of succession. What needs to be remembered is that although there is some tradition and precedent that governs the process of succession, ultimately Parliament is sovereign—any King or Queen reigns because Parliament allows it under the law, and Parliament could effectively change that law. It would not be easy, it would result in a constitutional crisis as such a law may not necessarily be signed by the present monarch, but ultimately Parliament decideds.
However, what about other royal systems in other royal countries.
Most European royal successions (of which all are constitutional monarchies just like the British system) one becomes as monarch through inheritance.
There are other systems, however, in which a sovereign is elected.
In Malaysia, for example, one becomes Yang di-Pertuan Agong (head of state) by being elected to it for a five year term. Eligibility is a bit limited: one needs to be one of the nine heriditary rulers (usually: Sultan) from the Malaysian states. The rulers of the states themselves do the electing, so the role is passed around among them, usually rotated in order of seniority.
In some of the states, the ruler/sultan is also selected from among family members, and may go to a more senior brother, for example, of a ruler rather than to the son. [complex].
So the answer in this context is to be eligible to be elected Agong.
Eureopean past elected monarchies.
There are also examples from the nineteenth century of Kings being elected in European countries, typically by inviting a member of ANOTHER country’s royal family to come and establish a new royal dynasty.
Some examples:
(a) Otto I of Greece was selected by the Great Powers (then: UK, Russia, France) in 1843 to become King of Greece. He was a Bavarian prince, a second son.
(b) George I of Greece; Otto I of Greece above was deposed, after years of mismanagement and unpopularity. The Greek National Assembly in 1863 selected and invited Prince William of Denmark, the younger son of King Christian IX of Denmark, to be King. Unlike Otto, he was not imposed upon Greece by the external great powers but ‘acclaimed’ king by the national assembly. He suited the Greeks who were looking for closer ties to the UK as a great power—his sister Alexandra was married to the Prince of Wales (Later Edward VII), plus his other sister Dagmar married the Russian Tsar. George I is the grandfather of Philip, the Duke of Edinburgh (which is why Philip, prior to his marriage to the British Queen, was a “Prince of Greece and Denmark”).
(c) Harkon VII of Norway; after the dissolution of the union of Norway and Sweden, Norway sought a new monarch and again turned to connections with Great Powers. Likewise, it was a Danish Prince—Carl, the grandsom of the Danish King Christian IX, Carl was a younger son of Frederick who was crown prince). Again, there was a British connection: he was married to Princess Maud, who was a daughter of British King Edward VII. A referendum had been held in Norway on whether the people preferred a constitutional monarchy or a republic—overwhelmingly in favour of the first, Prince Carl was offered the throne by the Storting (Norwegian Parliament) and thereby elected King.
So if you would like to be a sovereign King or a reigning Queen, then do consider being eligible for election (and living approximately in the late nineteenth century during a period in which several European Great Powers jostled for control by ensuring a family connection with ‘lesser’ states).