What to Know About Trump's Executive Order and What Happens Next Questions have swirled on what the order covers and whether it's legal.

 -- Demonstrations erupted across the country today, with thousands of protesters marching outside the White House and in major cities across the country to protest the executive order that President Trump signed Friday, which temporarily bans admission of all refugees as well as nationals from seven predominantly Muslim countries.

At airports and customs offices across the country, hundreds were detained amid widespread confusion about how to interpret the order. Four federal courts issued stays on implementation of various aspects of the order Saturday night, and late Sunday, Department of Homeland Security head John Kelly seemed to backtrack on a key part of the immigration order, saying that green card holders would not be prevented from returning to the U.S. "absent the receipt of significant derogatory information indicating a serious threat to public safety and welfare."

And President Trump tweeted Sunday that the order was "not about religion -- this is about terror and keeping our country safe."

Democrats vowed to introduce legislation to shut the order down, and Republican Senators John McCain and Lindsay Graham issued a joint statement saying Trump's executive order might become a "self-inflicted wound" that "may do more to help terrorist recruitment than improve our security." Trump responded in a series of tweets from his personal account, calling the two senators "wrong" and "sadly weak on immigration," and accused them of "always looking to start World War III."

Yet the legal opposition continues to grow. Here is where these legal efforts stand.

What Trump's Executive Order Says

- Bars admission to the U.S. of all nationals of Iraq, Iran, Libya, Somalia, Sudan, Syria and Yemen for 90 days. Applies to people with nonimmigrant or immigrant visas. The order itself leaves open the question of whether it applies to green card holders who are permanent residents. It also leaves open the question of whether it applies to some dual nationals of non-U.S. countries. It does not apply to dual citizens who have U.S. citizenship.

- Bars all refugees from anywhere in the world for 120 days.

- Indefinite ban on Syrian refugees.

- Potentially imposes ideological test for entry. That is, vetting could include questions about whether someone supports the U.S. government and its constitution.

- Potential religious test by prioritizing refugees facing religious persecution, which experts believe was intended to help Christians coming from predominantly Muslim countries. Officials will "prioritize refugee claims made by individuals on the basis of religious-based persecution, provided that the religion of the individual is a minority religion in the individual's country of nationality," according to the order.

What the Trump Administration Is Now Saying

- Although it remains an open question in the executive order itself, Homeland Security Secretary John Kelly wrote in a statement released Sunday: "In applying the provisions of the president's executive order, I hereby deem the entry of lawful permanent residents to be in the national interest. Accordingly, absent the receipt of significant derogatory information indicating a serious threat to public safety and welfare, lawful permanent resident status will be a dispositive factor in our case-by-case determinations."

- President Trump also took to Twitter Sunday to defend his executive order, saying it was "not a Muslim ban." Trump tweeted, "This is not about religion - this is about terror and keeping our country safe." In another tweet, the President told his 23 million followers that "Our country needs strong borders and extreme vetting, NOW. Look what is happening all over Europe and, indeed, the world - a horrible mess!"

- But none of the countries on the list have had anything to do with terror incidents on U.S. soil since the 9/11 attacks, and Saudi Arabia -- where 15 of the 9/11 hijackers were from -- is not included.

Where Things Stand Legally -- Court Rulings So Far

- Federal lawsuits were filed in New York, Massachusetts, Virginia, and Washington. They were petitions called writes of habeas corpus (literally present the body) by plaintiffs who had made it to the U.S. but were detained at airports. In all four cases, federal district court judges issues emergency stays -– i.e., they ruled for plaintiffs and ordered the Customs and Border Protection (CBP), a division of DHS, not to remove anyone who has arrived in or was en route to the U.S.

- In New York, District Court Judge Ann Donnelly issued a nationwide stay.

- In Massachusetts, the judge ordered CBP to apply existing law, which implied release from detention of anyone with valid visas, lawful permanent residents, and others who would legally be allowed entry. This Boston order, however, doesn't apply nationally like the New York order. - In Virginia, a federal judge further ordered that attorneys be given access to their clients who had lawful permanent resident status.

- In Washington, a federal judge prevented two "John Does" from being deported.

- The judges' orders are called "stays." They are a form of preliminary injunction, but they are very limited and will only last about a week or two. Two of these orders will expire if not extended next Saturday.

NOTE: These cases do nothing for people still overseas hoping to come to (or back to) the U.S. They only apply to those who made it here or are in transit.

What Happens Next Legally?

- More cases around the country will likely be filed. Even people with valid visas are still trapped abroad and cannot board flights and some are being strongly warned about traveling abroad, according to Lenni Benson, a lawyer working on these cases.

- Attorneys in the cases already filed will be back in court in about a week or two arguing for a preliminary injunction of Trump's executive order. The losing side will almost certainly appeal to the federal appellate court. After that, the case would be set for trial to rule on a permanent injunction of the order. In other words, a federal appellate court could stop the enforcement of the executive order.

- These cases could potentially rise to the Supreme Court, but they don't need to. Reaching the Supreme Court can sometimes take years. But according to Peter Schuck, a professor at Yale Law School, in very rare cases of "paramount importance," lawsuits can quickly go straight from federal district courts (where they're being litigated right now) to the US Supreme Court.

Is Trump's Executive Order Constitutional or Legal?

- Possibly. Federal law gives the president broad powers to suspend entry of foreigners or categories of foreigners who "would be detrimental to the interests of the United States." However, this authority has "never been applied so broadly or indiscriminately," said attorney Greg Chen from the American Immigration Lawyers Association. Foreign nationals outside the United States, and those who have arrived in the country but haven't yet gone through Customs and Border Protection, generally do not have constitutional rights.

- Nevertheless, Trump's order can still face legal and constitutional challenges on the grounds of due process, equal protection and the First Amendment Establishment Clause, which "says you cannot benefit one religion over another without good reason," according to Schuck, who said that it's yet to be determined "if Trump has good reason." This order was "terribly unnecessary, overbroad, and incompetently imposed on a bureaucracy that wasn’t ready to implement," Schuck added.

ABC News’ Teri Whitcraft contributed to this report.