We assume you're asking about becoming a Knight of the British Empire. That's the knighthood that has honored people like Sir Paul McCartney, Dame Maggie Smith, and Rudy Giuliani. Other monarchies and even the French Republic award knighthoods. There are also fraternal organizations that refer to their members as knights, such as Knights of Columbus, a Catholic lay order, and the Knights Templar, a Masonic order. But British knightings tend to get the most attention.
The sovereign of the United Kingdom (currently Queen Elizabeth II) is traditionally referred to as the "fountain of honour," the source of titles such as knighthoods, awarded in recognition of service. Varioushonorific orders exist, but not all of them include knighthood. Recipients of the four highest orders, including the Order of the Garter, are personally chosen by the sovereign. The Cabinet Office of the U.K suggests the rest of the honorees for the sovereign's approval.
Anyone can nominate a British citizen for knighthood or other royal honors (although self-nomination is discouraged). Nominations from the public account for about a quarter of all recommendations. The Prime Minister and government departments usually submit the rest of the recommendations for the biannual Honors List.
The Order of the British Empire is perhaps the most common knighthood given today. It's frequently awarded to civilians for public service and contributions to the nation. Many British scientists, educators, doctors, nurses, charitable and social workers, business people, athletes, writers, actors, musicians, and artists have received this distinction.
Foreign nationals can also be knighted, but they are not allowed to use the title "Sir" or "Dame" before their names (sorry, Rudy), although they can add "KBE" after their names. The U.K. Secretary of State for Foreign and Commonwealth Affairs usually nominates foreigners for knighthood and similar honors. Foreign knighthoods are conferred based on a person's contribution to relations between their country and Britain.
Since 1917, the British government has been awarding notable citizens with spots in the Most Excellent Order of the British Empire. Although the Order was originally meant to honor top-notch civilian and military behavior during war, it quickly expanded to include peacetime achievements as well.
The Order has five separate ranks: Knight Grand Cross (Dame Grand Cross for women), Knight Commander (Dame Commander), Commander, Officer, and Member. Achieving one of the first two ranks earns a person a slot in the knighthood, which means they can add “Sir” or “Dame” to their names. All members of the Order of the British Empire can add the initials of their rank to the end of their names, though, which is why you sometimes read about celebrities with ranks following their names, like “Roger Daltrey, CBE.”