This is the best option. There is no connection by train and there is just on bus per day at a bad time. From the 3 nearest capitals:
From Madrid you must take the highway until Huesca, once there take road N-240, direction Lerida, and once you have passed the village of Angues, take the first diversion to the left where it is indicated Alquezar. From Madrid it would take 4 hours to arrive, from Zaragoza it would be necessary 1:30 hours, and from Huesca 40 min.
From Barcelona, you must take highway A-2 to Lérida. Once there take road N-240 until Huesca, once you arrive to Barbastro take the diversion to Alquezar road. From Barcelona it would take about 3 hours to arrive, from Lerida 1 hour and from Barbastro, 20 min.
From San Sebastián-Bilbao ou must take the direction to Pamplona, take A-15 till the connexion with Zaragoza highway until Huesca. Once there, the indications are the same that those who come from Madrid. It would take about 4 hours to arrive
The nearest train connexions are in Monzón (35km far from here) and in Huesca, city connected by the train AVE.
The regular bus line arrives to Barbastro at different times (the nearest important village from Alquézar, 20km far). From here there is just one connexion per day and in school time to Alquézar. The taxi option is the most efficient.