Bus or train to Ponferrada, then bus to Piedrafita do Cebreiro. Walk or taxi the 5 km to O Cebreiro.
Or take the uber-cheap flight Madrid-Santiago, and the bus from there. Rome2Rio website is very helpful with these questions.
Hi @Alba M Diaz for sure you should take the ´cercanias´ local train from Barajas Madrid Airport (T4) to Chamartin Train Station Madrid then change onto the AVE high-speed train to Leon (in 2hrs) and from there take a bus to Ponferrada and follow the rest of the journey as per the recommendation by @Rebekah Scott You can buy the train from Madrid Airport to Leon in one purchase via the www.renfe.com website. ¡Buen camino!
In my last Camino I had really awful weather, so I decided to walk from Ruitelan to Piedrafita by the paved road (as cyclist frequently do); it was easy, but not particularly remarkable. Then, from Piedrafita to O Cebreiro, following, also the paved road. Great landscapes, almost no traffic, but anyway caution is advisable. About this latter walk, I am looking at Google Maps and see that there are paths that apparently connect to the Camino and O Cebreiro, avoiding the road. I don't know if someome has experience, it could be a useful resource; many people do this walk.
I think that walking the road to O’cebero is a waste of your sensual trek . Indeed it’s long and tough but the views and accent on a Roman road is priceless . I have traveled it about 6 times and your best plan would be the take alternate track , From you last night at Villafranca del bierzo catch the Pradela route (named after the village that you won’t reach) it high and wild but certainly worth the walk . It come down to the road , that you would have walked, about Dully if you went the regular way. When the trail heads up , it’s hard in places and stay at La Faba albergue which is about 4 miles from the top .then it’s a high and beautiful walk to ,Fun for Free, you will find it . Then on to Triacastra and Samos