I'm traveling to two different American airports before my airport. Because there is a 4-hour connecting time between flights, where would I pass through immigration? Or do I do that on all of them? Thanks.
You will go through US immigration and customs at the first airport where you enter the United States (the exception would be if you're coming from a Preclearence airport, but there aren't any of those in the UK).
If you have checked bags, you'll need to claim them at the baggage claim in the customs area, bring them through customs, and then return them to the airline staff to be checked on to your final destination. Your next connection will simply be between two domestic flights, and you will not go through customs at that point.
Have a good trip!