The aerobus is one of the quickest and easiest ways to get to the Barcelona city center. An aerobus goes to each terminal A1 (terminal I) and A2 (terminal 2). It costs 6,75 euros each way and you can pay by cash or card (at kiosk) before getting on the bus. Follow the signs for the aerobus, you will go down an escalator outside and see the aerobus directly ahead. The aerobus takes roughly 25 minutes without traffic and makes multiple stops. It stops in Plaza Espanya and then again in the Plaza Catalunya (the city center).
There is a train that leaves from terminal 2 and stops are major train stations in Barcelona, including Barcelona Sants (Sants estació), Passeig de Gracia, and El Clot. You can use a regular metro pass to take the train. It takes about 30 minutes and you will likely need to change to a metro line once you arrive at the train station. The train runs every 30 minutes and the last train leaves at 11:30 pm.
You can take the L9 metro line from either terminal to Barcelona. This will take roughly 45 minutes. Follow the signs in the airport for the Metro L9 Sub. Once you get into Barcelona you will be able to connect with other metro lines. You can buy a T10 metro pass prior to getting on the metro, this costs roughly 10 euro and allows for 10 rides.
A cab is the quickest way to get into the city, but also the most expensive. It takes 20 minutes without traffic to get into Barcelona and will cost roughly 30 euros, depending on the time of day. It is more expensive at night and during rush hours. Follow the signs for taxis in the airport and you will see a line of taxis waiting.