The Supreme Court ruled in favor of marriage equality on Friday in the Obergefell v. Hodges, which challenged the constitutionality of state gay marriage bans. The ruling could essentially require every state in the nation to allow same-sex couples to marry.

That may sound simple, but the case has more than two dozen plaintiffs from four states. Here is everything you need to know to understand the complicated lawsuit, and what it could mean for marriage equality.

1. Who are Obergefell and Hodges?

James Obergefell married John Arthur, his partner of more than 20 years, in October 2013. Two years before they wed, Arthur was diagnosed with the incurable disease amyotrophic lateral sclerosis (ALS).

Unable to marry in their home state of Ohio, which banned gay unions, the couple traveled to Maryland, but Arthur was so ill that the ceremony had to take place on an airplane tarmac. Obergefell, however, could not be listed on Arthur's death certificate as a surviving spouse because the state did not recognize the couple's marriage.

This could be the last day I ever wake up in a country with out #MarriageEquaility . Do good work SCOTUS. — Heather Dawn (@Revisedangel) June 24, 2015

Richard Hodges, the respondent in the case, is the director of Ohio's Department of Health. He is named because Obergefell and Arthur sued to force the state and the Cincinnati Health Department Office of Vital Records to list Obergefell on the death certificate. As the case proceeded, it added additional plaintiffs.

Jim Obergefell appears at the Supreme Court on March 6, 2015. Obergefell is the named plaintiff in Obergefell v. Hodges, a marriage equality case that challenges the constitutionality of gay marriage bans. Image: Andrew Harnik/AP/Corbis

At the same time, same-sex couples in Tennessee, Kentucky and Michigan filed their own suits challenging gay marriage bans. These cases, respectively, are Tanco v. Haslam, Bourke v. Beshear, and DeBoer v. Snyder. Most of the plaintiffs are parents and don't have the same legal rights to their children as heterosexual couples do.

The Supreme Court decided to look at all of these cases together and consolidated them under Obergefell v. Hodges.

2. What legal and constitutional questions are the Supreme Court considering?

Put simply, Obergefell v. Hodges is about gay marriage bans, and the practical consequences of such laws for same-sex couples and parents. The Supreme Court, though, is looking at two very specific questions:

Does the Fourteenth Amendment require a state to license a marriage between two people of the same sex? Does the Fourteenth Amendment require a state to recognize a marriage between two people of the same sex when their marriage was lawfully licensed and performed out-of-state?

The Fourteenth Amendment, according to the Library of Congress, prohibits states from denying any person "life, liberty or property, without due process of law" or to "deny to any person within its jurisdiction the equal protection of the laws.”

It's my hope that the Supreme Court will rule in favor of love and commitment and rule in favor of #marriageequality. http://t.co/eDzaITyJDT — Tammy Duckworth (@RepDuckworth) June 24, 2015

In other words, the Supreme Court is trying to decide if states are violating the equal protection clause by refusing to marry same-sex couples or refusing to recognize a marriage between those spouses when it occurs in another state.

Critics of gay marriage say the plaintiffs are asking for a new constitutional right to marry someone of the same sex. Supporters, however, say they just want the same right to join the institution of marriage that is granted by states to straight couples.

3. Do we know where each justice stands on this issue?

The liberal justices — Elena Kagan, Sonia Sotomayor, Ruth Bader Ginsburg, and Stephen Breyer — are all expected to rule in favor of the plaintiffs. The swing vote belongs to Anthony Kennedy, who has long indicated that excluding lesbians and gays from marriage is not constitutionally defensible, or humane.

Chief Justice John Roberts hinted in the April hearing that he might be open to joining this majority, though in a limited way by declaring state bans sex discrimination. The logic here is that states forbidding a man or woman to marry someone of the same sex are engaging in gender bias. Roberts, though, may very well side with the conservative justices Samuel Alito, Clarence Thomas and Antonin Scalia.

4. What will happen if the Supreme Court finds these state bans unconstitutional?

More than 35 states and Washington, D.C., have recognized same-sex marriage, according to the National Conference of State Legislatures.

David B. Cruz, a professor of law at the University of Southern California Gould School of Law, wrote on SCOTUSblog that "...a ruling by the Court in favor of the same-sex couples in these four cases would doom the marriage exclusions in the other ... states still discriminating against same-sex couples, ushering in a new era of nationwide marriage equality."

#Patriots be ready. After #SCOTUS rules on #ObamaCare & #GayMarriage soon, America as we've known her will profoundly change. God help us. — Larry Brown (@LarryB_in_OK) June 22, 2015

If the bans are unconstitutional, the Supreme Court will surely lay out expectations for how states must start allowing same-sex marriage and recognizing unions that happened elsewhere. It's not clear yet whether same-sex couples living in states with bans will be able to immediately marry, or if they'll need to wait. State legislatures might also try to pass bills that circumvent the court's decision.

5. When will this happen?

The court will rule on the case before the end of June. Their decision could come as early as Thursday, though many believe it will be announced on Monday, June 29. Announcements are made at 10 a.m. Eastern time. Those interested in getting minute-by-minute updates will be watching SCOTUSblog, which tracks Supreme Court decisions in real time.