The main function of the judicial branch is to interpret and apply the law and provide a mechanism for the settling of disputes. The judicial branch does not make laws in most cases, nor does it enforce them.
The judicial branch is made up of members appointed by the president and confirmed or approved by the Senate. Congress chooses how many Supreme Court justices there are and can also have a say over the district courts that try the federal cases. The federal judges who work in these courts, including the Supreme Court, can only be removed by impeachment through the House of Representatives and conviction through the Senate. Judges who have been appointed serve until they retire or pass away. This method is put in place to help keep the pressure of election or the public's influence from affecting their position or their work. This allows the judges to make their decisions solely based on the law with no outside influence. The courts will only try cases that show a party has been harmed in some fashion; they do not give advisory opinions on laws or the legality of actions. The cases generally proceed from normal courts to a district court before utilizing an appellate court. Only after a case has been through these stages can they be considered for hearing by the Supreme Court, but that is rare.