Entering the United States illegally is a crime, a misdemeanor on the first offense and a felony on any subsequent offense. The courts have held that people who enter the United States illegally are entitled to due process before they can be deported. The courts have also held that Congress may determine what constitutes due process. In 1996 Congress passed the “Illegal Immigration Reform and Immigrant Responsibility Act.” Among other provisions, this law allows illegal immigrants to be deported without any hearing, lawyer, or right of appeal. This is called “expedited removal.”
For their part, illegal immigrants can try to dodge expedited removal by claiming asylum. To gain asylum, the immigrants must demonstrate a credible fear of persecution if they remain in their home country. What constitutes “persecution” is itself contested. Most of the people now showing up at the border are trying to escape endemic poverty, violent crime, and ineffective and corrupt government in Central American so-called countries. Liberals regard these conditions as legitimate grounds for claiming asylum; conservatives want to restrict asylum to the traditional definition of people fleeing political or religious persecution by national governments.
Different administrations have applied the law in different ways. Although the 1996 law sets no geographic boundaries to where the law may be applied, the current policy has been to apply it to illegal immigrants found within 100 miles of the border and within two weeks after they entered the United States. Furthermore, the government can either treat illegal immigration as a civil matter or as a criminal matter.
The Obama administration largely treated illegal immigrants as a civil matter. This allowed illegal immigrants to work through the process of the immigration courts, to be represented by a lawyer, to appeal decisions of immigration judges multiple times. This could extend the time to deportation to a year or more. While the civil procedures dragged on, the illegal immigrants were paroled, rather than detained in custody.
Recently, the Trump administration broke with the policy of the previous administration. It adopted a policy of “zero tolerance” for illegal immigration and it chose to treat illegal immigration as a criminal, rather than civil, matter. Thus, illegal immigrants, even when claiming asylum, were arrested. The government is legally-obligated to separate children from arrested parents within 20 days of arrest, then to place them in a suitable child care facility or foster family. During the Obama administration, all but one family detention facility were closed. This had the unpleasant knock-on effect that has garnered so much attention.
 “In the United States, the federal government generally considers a crime punishable with incarceration for one year or less to be a misdemeanor. All other crimes are considered felonies.”—Wikipedia.
 Katie Benner and Charlie Savage, “Migrants to the U.S. Are Entitled to Due Process, With Some Exceptions,” NYT, 26 June 2018.
 Which is like calling illegal immigrants “undocumented.” See George Orwell, “Politics and the English Language.”
 Ryan Duee, “Migrants Risk U.S. Crackdown to Flee Crime and Poverty,” WSJ, 26 June 2018.
 Obviously, there is some wiggle room here for the government. It can be pretty difficult for migrants to prove when they entered the country.
 On the background to the “Flores Settlement” case, see: https://www.humanrightsfirst.org/resource/flores-settlement-brief-history-and-next-steps