I will be traveling from the US To Naples Italy, with a connection in Madrid. On the way back to US, the layover in Madrid is 15 hours. I want to take advantage of the time to do some sight-seeing. I am traveling only with a carry-on bag. I'm a bit confused about what I would need to do for customs and immigration if I choose to leave the airport. Here are my questions: 1. When I get to Madrid from Naples, do I have to go through passport control upon leaving the airport? 2. Do I have to go through customs upon leaving the airport? When arriving back to the airport for my flight to the US do I, again, go through passport control and customs? Any clarification would be appreciated!
In Madrid you are still in the Schengen area so no control - you just leave the airport.
On your return to the airport you will go though security and there's a passport check as you're leaving Schengen. Customs are for things and you will not encounter this until you enter the US.
Depending on what airline you are using, you might have to go through two passport checks when you get back to the airport. First you go through security. Then you go to immigration (passport check). Then, at least on Delta, you go through a final passport/boarding pass check before going to your gate.
Take the express bus from the airport to Atocha Station, leave your bag in a locker there, and walk to Picasso's Guernica and/or Velasquez's Las Meninas depending on whether you're in the mood for newer or older art.
http://www.esmadrid.com/en/airport-express
Nice parks to stroll in either way.
This article explains the options to/from the airport. There are lockers at the Atocha train station where you can store your stuff.
Make sure you have both boarding passes when you check in at Naples. If you don't, you'll have to spend time checking in for the second flight. When you return to Barajas, you'll go through security which could be slow and passport control, usually short.
There is also luggage storage at the airport. I used it about 5 years ago when we had an 8 hour layover.
Before you store at the airport, check your terminals. If you aren't departing from the same terminal you arrive at, it may not be as convenient as the train station.