The best ways to reach the city and UPF from the airport are by the AeroBus, Train or Taxi.
BUS (Aerobús): The Aerobús is an express bus service that connects the Barcelona-El Prat airport with the city centre (plaça Catalunya) in 35 minutes. You can take the Aerobús outside Terminal 1 and Terminal 2. This service runs every day of the year with departures between 5 and 15 minutes. From the city centre, you can take then take the metro or a city bus to move around Barcelona. From the city centre to the airport, bear in mind the departure terminal of your flight and take the Aerobús, line A1, to terminal 1 or Aerobús, line A2, to terminal 2.
TRAIN: The train service (R2 line) runs approximately every 30 minutes to and from Barcelona airport to the city centre. The journey takes 25 minutes. The train service operates from Terminal 2 (T2). To get from T2 to T1, use the shuttle bus service (Bus transit T1-T2). If you travel from the airport to the city centre, you can get off at Barcelona-Sants, Passeig de Gràcia or Clot which are serviced by metro stops. Clot is about a 25 minute walk from UPF.
TAXI: Taxis from Barcelona Airport offer their services 24 hours, waiting for passengers at the taxi ranks located in both terminals. A journey from the airport to the city centre usually takes between 20 and 40 minutes depending on which terminal you land at (T1 will be longer than from T2) and traffic conditions. All official Barcelona taxis are black and yellow and are required to charge you only the value on the taximeter (plus any surcharge, e.g. luggage or night). The rates and surcharges are displayed inside the cab. In Barcelona, a taxi may be ordered by phone; found at authorized taxi rank or flagged down in the street.
METRO: The line L9 Sud Metro connects downtown Barcelona with the airport. It goes through Barcelona, L’Hospitalet and El Prat de Llobregat. It links the Zona Universitaria district with the airport's terminal 1. The complete journey takes 32 minutes and trains run every 7 minutes on weekdays. Along the way, you can link to different metro lines. To reach UPF you would need to change lines to reach the closest metro stop, Ciutadella – Vila Olimpica, Line 4. See: https://www.tmb.cat/en/barcelona-transport/map/metro for maps and further details.
FROM WITHIN BARCELONA
H16: Ramon Trias Fargas / Dr. Trueta stop
10: Ramon Trias Fargas stop
14: Sardenya / Dr. Trueta stop
METRO: The nearest metro station is Ciutadella – Vila Olimpica, Line 4. Just walk 200 meters down Ramon Trias Fargas (away from the sea) and the University is on the left side of the street.
TRAM: Line T4 - Wellington and Ciutadella-Vila Olímpica