hi jocelyn,
where are you coming from, at what terminal and at what time? madrid barajas airport has 4 terminals. if you are taking the train, you can buy a ticket at the renfe station in either terminal 4 or terminal 1. the terminals are interconnected. you will have to take the cercanias (commuter train) from the airport to chamartin station in madrid city centre (where the trains depart for leon). the price of the cercanias train will be included in the price of your train ticket. the ticket is sold with reserved seat. there are 5 fast alvia trains and 3 slow md trains for this particulr date. alvia trains departure at 07:30, 11:00, 14:40, 18:30, 20:20. arrival times from 2h 42m to 2h 54m. md trains departure at 11:30, 14:30, 18:29. arrival times from 4h 19m to 4h 30m. prices for fast train and slow trains are 44.40 and 34.75 euros respectively. make sure you take the cercanias train to madrid city centre and not the metro line. the entrances are on the same floor.
you can also take the bus. alsa has 4 buses on this day to leon from terminal 4 at the airport with departure at 13.45, 16:45, 21:45, 23:00 with arrival times to leon from 4h 15m to 5h 00 at a cost of 22.60 euros. however i would not recommend taking the bus as you will be arriving at leon at night.
you can pick up a credencial peregrino at the benedictine monastery or at the cathedral.
give me a shout if there is anyway i can further help you. que tengas un buen camino y que dios los bendigas.