I would like to take the AVE train from Madrid's Atocha Station to Toledo on Monday, October 31. Will I be able to buy the train ticket on the day of departure or should I reserve ahead of time? I will not be in the country until October 31.
I would buy it there, rather than counting on close timing with your flight. A few departures at popular commuting hours could sell out, but not all.
I'd buy it at the airport's Renfe office, if you will be arriving there, or at the Atocha's train station upon your arrival.
There are several trains that run that route (almost every hour) daily & there's no advantage in buying in advance, as the price will be the same @ €12.90 pp.
BTW, the train traveling from Madrid to Toledo is an AVANT train, not AVE, but the travel time is only 33 minutes.
Enjoy your trip!
Buy the tickets at the airport. They'll sell you the next available train. You may have to buy a separate ticket for the Cercancias train to Atocha (it's free with the AVE, probably not with the AVANT). And yes, the tickets back to Madrid do sell out, so buy at the airport - or buy them online a few days before you leave, especially if you're only staying a night or two. I would not wait to buy tickets at Atocha - it's a huge station with many, many people and lines can be long.
Definitely buy the tickets at the RENFE office at the airport, not at Atocha. The lines at Atocha are quite long and it's not unusual to wait 60-90 minutes. If you know your return date and time, buy the return ticket at the same time. Otherwise, buy it at the Toledo station once you have decided. Some trains do sell out, so better not to wait and buy just before you leave.