Hi, Tom,
I think our resident expert is still out of town (Rebekah lives in Moratinos just a few kms away). My best guess is that you would need to get into Sahagun, about 12 kms away, and from there you'll find transportation to Madrid. You can call (or have the albergue call) a taxi in Sahagun, I'm guessing the fare would be under 15 euros.
From Sahagun there are five trains a day on RENFE's website. The bus company, alsa.es, shows two buses a day from Sahagun to Madrid. One at noon, one at 5 pm, both take about 4 hours. I don't know if you're heading straight to the airport or where your final destination is, but public transportation in Madrid is easy to navigate. Let us know.
Buen camino, Laurie