You can come into the city in 3 ways: taxi, bus or train. Taxi from the airport to the city centre would cost you 30 euros. Bus is convenient and costs 6 euros.
Here you have all three options explained in detail: http://immovingtobarcelona.com/how-to-get-to-barcelona-from-el-prat-airp...
Public transportation: One can find many metro lines, bus, tram and trains in Barcelona.
Metro opening hours:
• Monday to Thursday: 5.00 am until midnight.
• Fridays and eves of public holidays: 5.00 a 2.00 am.
• Saturdays: from 5.00 am and runs all night.
• Sundays: until midnight.
• Public holidays during the week: until midnight.
Bicing: An alternative transportation mode is bicycle. ‘’Bicing’’ is Barcelona’s public bicycle borrowing system for permanent residents only. Barcelona residents can register online to get a Bicing city bike membership card. The cost is around €50 a year.