There are state systems and federal systems. Each state has their own system of courts, and their own supreme court. In California, where we live, the highest court is the California Supreme Court. The Cal Supreme voted to allow gay marriage, and that’s why Proposition 8 was funded. That passed, and changed the state constitution to require banning gay marriage. Because of that the California Supreme court had their hands tied. State judges can be either appointed or elected, depending upon the state.
So the opponents sued in Federal court. Federal court is done before a judge, who is appointed by Congress. Prop 8 was argued before a Federal judge, because the State court couldn’t do anything anymore. (BTW, the Kitzmiller vs. Dover was also argued to a Federal judge). When the Federal judge makes his or her decision, then they can decide whether to appeal or not. That’s where the Appeals Court comes in. There are, I think, 9 circuits in the U.S. The 9th Circuit covers the Western states. The case will be argued to the 9th Circuit, who will make their decision. After that it goes to the Supreme Court of the United States, or SCOTUS. My prediction is with our current political climate, the 9th Circuit will uphold the current ruling and SCOTUS will overturn it.