The Supreme Court is able to assess the constitutionality of a law through a process known as "judicial review."
Since the Judicial Branch is one of three main branches within the United State's Government, it serves to counter-act the Executive & Legislative by putting them under the scrutiny of another branch, and vice versa.