They find it Constitutional or Unconstitutional. If it's Unconstitutional get the laws rewritten to conform to the Constitution.
I'm not saying it's right, I'm saying thats how it works. Today's decisions is a perfect example. One member of the House & one member of the Senate has already put up legislation to take care of what was not accomplished in repealing all of DOMA. The system works it may not be fast but it works.