Simply go towards the Metro Station Moncloa from where you can buy on the spot your ticket to Segovia. You can go with for example La Sepulvedana and the price of the one way ticket is 7.96 € . There are buses leaving every 30 min so no need to stress :).
I went there on a sunny Sunday in April last year and I had an absolute awesome time.
Once at the train station we stopped to have "breakfast": una caña with a small tapa next to it...good life!
Finishing our breakfast we head towards to the city center which was 200 m away from us but still you could not yet see the amazing aqueduct that the Romans left Spain as a ever lasting impressive structure.