The Nearest Real Beach to Madrid
Until recently, the nearest beach to Madrid was in Valencia. In three-and-a-half hours you can be in Valencia, where you can then take a taxi to the city beach. It is expensive but it's not an impossible day trip from Madrid. If you catch the 8am train from Madrid you will be in Valencia for 11.30am and on the beach by midday. Note that this is entering the hottest time of day and skin experts advice against sunbathing at the hottest time of day.
However, with the extension of the AVE train into the north-east of Spain, you can now get to beach cities of Tarragona and Barcelona in about two hours and forty minutes. Take a train at about 7.30am and you can be on the coast by a little past 10am!