The four days (actually a little less when you consider travel to the hotel, El Escorial, and leaving for the next stop) will give you ample time to sample and savor the city. From the airport, you can take the airport express bus if there is a stop near your hotel, or take the aerocity van directly to your hotel. The bus is five euros, and makes a couple of stops before reaching the destination at the Atocha train station. The aerocity van will be in the neighbor hood of 15 of so euros, each, depending on the location of the hotel.
El Escorial can be reached either by train from the other train station, Charmain, or by bus. The bus leaves you a bit closer to the castle, but the walk from either is doable. Allow plenty of time to see this...well worth it.
In Madrid some of the major highlights are The Prado art museum, The Park Retrio, The City Hall at Cibeles Fountain (midway between the Park and the Prado, Puerta del Sol, Plaza Mayor, the Royal Palace, and Gran Via. All are walkable if you have good shoes. If not, the subway (Metro) is easy to navigate.
I have yet to get to Granada, and hope to do so on my next trip in the fall.
Seville, you may not need four nights, but this would depend on your time of arrival. I have been there for three days and nights and saw the city. I recommend Really Discover Sevilla Tour Company...Small groups and well done.
The AVE Train from Sevilla will take you to Madrid's Atocha Station in 2 1/2 hours. There is a snack car on the train. The train station in both cities are easy to navigate. Your tickets will have the car number and the seat number on them. From Madrid to Barcelona is about 2 1/2 hours as well. Same set up on the cars as from Sevilla. The trip will be enjoyable as you will see different landscapes along the way...the orange and citrus groves in the south, vineyards as you approach Barcelona. A great B&B in Barcelona is El Balcon De Born...in the heart of the gothic quarter, about two blocks from the Picasso Museum, Santila del Mar church.
Check out the www.madridman.com site for good information on your travels...not just in Madrid. Also The Moon Guide To Spain is excellent...
You will have a great trip I am sure.