Is it safe to buy on the day of, or prior?
I prefer to buy in advance, that way I get the train time that I want & I don't have to worry about availability.
Also I don't have to queue at the station for tickets.
I would buy tickets ahead of time.
If you want to queue at the station to buy tickets, there are two queues. One queue is for tickets for that day and the other queue is for tickets in the future. The queues are very long and it may take you more than an hour before you reach the teller. I am speaking from experience.
I would buy the tickets the day ahead. We have an issue with earlier tickets selling out quickly on the same date, so I would do the ahead ones.
Edit: if you run into a pickle, you can also take a bus which, apparently, is equally quick and easy. I do not know from which bus station but our hotel staff would be very helpful if we would go the bus route.Edited: 5:36 pm, June 14, 2018
Anna!!!! Long time no see...
Got excited for a sec as I thought you are also giving me advice on a particular Madrid pickle I just have to try. That’s how my brain works! But alas.
I’ll look into the bus option as well. Well, I already looked and didn’t like something but don’t remember what it was. Maybe it was simply because it’s a bus!
I can give you a very interesting ‘pickle’ where they served amazing fabada/ bean stew. There were lots of people enjoying their lunch on Sunday afternoon there. I cannot say that we had amazing food in Madrid. Some of it was ok or better than other, but nothing amazing. We may not have researched enough. We had very good food in Seville and in Cordoba, though. I could collect some names for you depending where you will be going.