The president of the United States nominates all federal judges, including Supreme Court justices, and the Senate confirms them. The Constitution does not stipulate the qualifications for these justices, only that they demonstrate "good behavior."
When a vacancy arises in the Supreme Court, the president receives recommendations from several sources, including the Justice Department, the American Bar Association, the FBI and members of Congress. The president considers candidates' political belief systems and affiliations, experience, gender and ethnicity when making judicial appointments. The Senate Judiciary Committee reviews each nominee before confirmation by the Senate.
There are nine justices on the Supreme Court, more than 600 on district courts, and almost 200 on courts of appeals, so the president relies heavily on recommendations when making a nomination. Tradition also plays a role, especially when appointing district judges. In this case, senators from the state of the vacancy make the choice, and the president usually accepts their decisions.
All judges at the federal level are appointed for life terms; they can only be removed by the U.S. Congress through a two-step process. First, the House of Representatives votes to impeach the judge by a simple majority. The case then goes to the Senate, and removal is accomplished only if two-thirds of the senators vote in favor of this action.