"I am not sure how to find out what terminal the flights would be out of" First, find out who is actually operating the flight. Many flights these days are "code shares," meaning that (for instance) a United flight will also have a Lufthansa code number. For a random one I just looked up, it was United flight 62 and Lufthansa flight 7970, "both" leaving Newark at 8:20 PM for Madrid. There's only one plane, operated by United (said to be "United metal"). Often the clue, as in this case, is a flight number over 2000, meaning someone else actually operates the flight. So, to find out where a flight departs and arrives, you go to the official website of the airport, and look for the airline that is actually operating the flight. This is very important for check in; if you go to the Lufthansa terminal or desk to get this flight, you'll be redirected to the United terminal, which wastes a lot of time. Here's Madrid Barajas Airport website, listing who lands where: http://tinyurl.com/ckbh595
(Sorry, even the tiny version won't hotlink for some reason). Note that while the airport considers 4 and 4S as one terminal, they are really two terminals, each GIGANTIC. (I see that 4S isn't specified in that list separately, but it should be). And here's the airline list for Heathrow: http://www.heathrowairport.com/flight-information/which-terminal For many airline/airport combinations, the same airline can use different terminals, so you have to know the flight number or the city served.