Many foreign-born undocumented persons live and work in the United States. If they are basically law-abiding and form family ties here, U.S. immigration authorities might not bother them. However, an arrest could happen any time; possibly because someone decides to call U.S. immigration agents and tip them off, in an effort to have them deported. If that occurs, what is likely to happen next?
You are indeed at risk that someone; perhaps an employer who doesn't want to pay you, or a neighbor with a grudge; contacts U.S. immigration authorities (specifically, Immigration and Customs Enforcement, or ICE). However, nothing will happen immediately or automatically.
First, there is the question of whether ICE will act on this tip. They do not have the resources to follow up on every tip they get. They might simply ignore it.
ICE agents are expected to follow a policy in which they take a closer look at each individual case and decide whether to exercise something called "Prosecutorial Discretion." This means that they examine the person's or family's situation—their history of responsible work and family life in the U.S., and family ties to U.S. citizens—and sometimes decide not to initiate removal (deportation) proceedings against them.
The idea was that ICE is supposed to direct government resources at people who have committed crimes or present security risks or are otherwise negative forces in U.S. society. Even if ICE has already set court proceedings in motion, they can use Prosecutorial Discretion to close them; and in some cases even allow the person to obtain a work permit.
That takes us back to the question of whether ICE has the resources to act on any tip. It still doesn't. But as you no doubt realize, it's a game of chance at this point.
If ICE does attempt to remove you, agents may arrest you and/or your undocumented family members. They commonly do this at home, and at night, since they're most likely to find everyone there at that time. Nevertheless, they could choose to arrest you at work, in public, or pretty much anywhere. They sometimes follow a policy of staying away from sensitive locations such as schools, hospitals, churches, mosques, temples and other places of worship, and courthouses, but not always.
The U.S. constitution affords you certain rights even if you are undocumented. Try to remain calm and not panic.
You have the right to ask the ICE officer whether you are free to leave. If the officer says you are not free to leave, you have a right to remain silent. If you choose to remain silent, you should say to the officer clearly and loudly that you wish to remain silent.
You may refuse to show identity documents that say what country you are from; however, you should never lie or show false documents such as a fake green card or Social Security card.
If ICE has not arrested you, you do not have to consent to a search of your person or your belongings; however, an ICE agent who believes you have a weapon may pat you down.
If ICE arrests you and takes you into custody, you have the right to contact and speak to an attorney. You do not have to sign any papers until you speak with an attorney. The U.S. government will not pay for the attorney's services, however.
You can also ask the immigration officer for a list of pro bono (free or low-cost) attorneys. See How to Get a Lawyer to Represent You Pro Bono (Free) in Immigration Court Removal Proceedings.
You also have a right to contact your home country's consulate—it might be able to offer some help, at least with minor administrative things such as locating your identity documents.
After an arrest, you will most likely be charged with being deportable, released on bond, and then told to appear in Immigration Court on a certain day. A document called the Notice to Appear or NTA will describe the charges against you (that you're in the U.S. unlawfully, most likely) and give you a date for your first court appearance, called a Master Calendar hearing.
If you have any defenses to deportation, you can then ask for a full court hearing at a later date (called a "Merits Hearing.") See Possible Defenses to Deportation of an Undocumented Alien for more on the possibilities, which include things like a fear of persecution in your home country giving rise to an asylum claim, or marriage to a U.S. citizen.
This government agency's history of making sure that children are cared for in such a situation is not great. Make sure your children know where to go and who to contact if you are not at home when expected.
It might be wise to consult an immigration attorney in advance about your situation, so that you have already lined up someone who can start acting on your behalf and figure out where you are being held. Also see Who Will Care for My Child If ICE Arrests or Deports Me?.