My partner will be flying to the United States from the UK and the flight will have a layover in a different state. When they land at the airport, what happens before they can proceed to the gate for their connecting flight? Will they go through customs and immigration after the first, second, or both flights? About how long does the process take? Is a 90-minute layover enough time? What about a 2-hour layover?
In the US, the general process for international-to-domestic connections on a single ticket goes like this (there are exceptions, see below):
Before/during check-in, you will need to provide passport details. This will be sent to the US and they will check for a valid ESTA and other details. At this point, US CBP will issue a "board" or "do not board" message to the airline.
Remember that it can take up to 72 hours to get an ESTA, so don't wait until the last minute to get it, or you WILL be issued a "do not board" message until you have one and it has been approved.
During check-in, luggage will be tagged to the final destination.
When you land at the first airport in the US, you have to go through passport control (immigration). This used to be extremely long in many circumstances (especially for non US citizens/residents), this has been sped up quite significantly over the last few years. You can check historical wait times here.
After immigration, reclaim your bags (as if this was your final destination).
Go through customs.
Just after customs, there will be a connecting passenger baggage drop desk. Just drop your checked bags there (they already have a tag to the final destination, so there's very little waiting or queuing if at all).
If required, go to the terminal for your connecting flight.
Go to departures, but skip the check-in desks, go directly to the security checkpoint.
Go through security. This can be quite long. You can use the MyTSA app to view waiting times.
Go to your gate.
At this point you're on a domestic flight with domestic passengers, so at your destination it's like you just departed from the connecting airport, no immigration, no customs, nothing.
In this situation, 1h30 or 2h seems to be the new normal MCT (minimum connection time) airports/airlines use for international-to-domestic or international-to-international connections. A few years ago this would have been madness, apparently they now think it's perfectly doable (or they wouldn't sell it, as it causes a lot of problems for them if you don't make it).
It's much easier if you're one of the first to deplane, you are a US citizen/resident, you have Global Entry, Sentri or Nexus, no checked luggage, PreCheck or priority lane for security and it all happens in a single terminal (some around here have done so in some airports in less than 30 minutes), but even for the average passenger it should be doable.
If you don't make it, then (we're still talking about a single ticket here) it's the airline's responsibility to rebook you. You may get at the final destination late, but you should get there. Before booking, check if there are good alternative flights to your final destination (i.e. the initially planned connecting flight is not the last flight of the day to that destination for that airline), and avoid tight connections on very busy days, and be patient, you'll get there at some point.
Now, the exceptions:
First, if the two flights are ticketed separately, all bets are off. You need to go through check-in for the connecting flights, drop your luggage at the check-in/luggage drop desk before the check-in deadline, and if you miss it, you have to rebook and pay for a new ticket at last minute prices. So unless the second flight is extremely cheap and frequent (even at the last minute), add several hours to make the connection, ideally stay overnight.
Some non-US airports have "US preclearance": you go through US passport control and customs before you even board the flight to the US. Then the flight to the US is considered like a domestic US flight, you don't go through passport control or customs at the first airport in the US, and you don't have to reclaim/drop your checked luggage, it gets transferred directly. In Europe the only airports which feature this are Dublin and Shannon in Ireland.
There are some special ITI (international-to-international) and ITD (international-to-domestic) programmes at some airports, for some airlines, for some combinations of flights, where the process is simplified, and you may not have to reclaim/drop your bags (they are transferred automatically). But details are quite limited, and your airline should let you know if this is the case.
In the US, immigration and customs checks are performed at the first landing. From there on there are no more customs checks, and if the rest of the flights are within the US - they're treated as domestic flights and the passenger is a domestic passenger.
The immigration and customs may take a short time, or a long time. Depending on the situation at the terminal at the time.
If you bought a single ticket with a connection, then usually airlines know how long to expect this to take and will not sell tickets that don't allow enough time. If it takes too long, the airlines will take care of rescheduling the next flight. Your luggage would usually be checked in to your final destination, but you'd still need to collect it for the customs check and then return it to the baggage handlers after you passed the customs.
If you bought two separate tickets, then the rescheduling in case of too long a line at the immigration is on you, and also re-checking in the luggage.