Here is one of the trains that will take you to areas around Barcelona, such as Montserrat. You absolutely must go to Montserrat! It's very easy: take a metro to the stop that has the train station going to Montserrat, buy your ticket, then you're off! When you buy your ticket to Montserrat, it should come with a ticket for the cable car up the mountain as well as a ticket for the funicular up the side of the mountain. When we were there, however, the funiculares were not functioning because flooding that damaged them.
ARAGON PYRENEES - FROM BARCELONA
1. Train to Lleida (Lerida)
2. Bus to Huesca
3. See below