Taxi
There's a taxi rank on the top level, on part of the roof of the modern terminus easily reached up travelators from the arrivals hall when arriving by high-speed train. There's another taxi rank at ground level, just outside a west-side exit from the tropical garden in the old trainshed.
A taxi to Puerta del Sol costs around €8, to Chamartin station around €21. Taxi fare calculator.
How to transfer between Atocha & Chamartin
Trains to/from northern Spain usually use Madrid Chamartin station in the north of the city. The trains south to Seville, Granada, Malaga leave from Madrid Atocha station, although for capacity reasons most trains to Alicante now use Madrid Chamartin. Metro line 1 links these two stations, but it's easier and quicker to transfer between stations by frequent suburban train. The Spanish for suburban train is Cercanias, look for the orange and white 'C' logo.
Atocha ► Chamartin
Buy a ticket to Chamartin from the self-service machines which have an English language facility. It's one zone, the fare is around €2, the machines accept euro notes & coins.
Tip: If you have an AVE, Iryo or other long-distance train ticket, you may get a suburban ticket free, see information about Combinado Cercanias.
Go to platforms 1 & 2. Trains from these platforms all go to Chamartin, every 5-10 minutes. The journey is 3 stops and it takes just 10-15 minutes. It doesn't matter which train you get on as long as it's going north, as every northbound Cercanias (suburban) train from Atocha goes to Chamartin, including Cercanias routes C-1, C-2, C-4, C-7, C-8, C-10.
If you have a Premium-fare ticket you can use the Sala Club 1st class lounge at Madrid Chamartin station, through a poorly marked door next to platform 14. In the Sala Club you'll find a quiet, civilised and relaxing place to wait, with complimentary tea, coffee, juices and free beer. It's open 06:00-22:45 Mon-Fri, 06:10-22:45 Sat, 07:10-22:45 Sun.
https://www.seat61.com/stations/madrid-atocha.htm