If you are traveling to a foreign country and you have a layover in the US, you will not have to apply for the B2 Tourist visa provided that you do not leave the airport. If you intend to leave the airport while waiting for your connecting flight, it is necessary for you to apply for a visa.