Barcelona has different means of public transport, probably the most used ones are the metro and the bus but there are others such as what we call de tram, there are 6 lines that go around the city. However they don't link the main tourist areas so you will probably won't use it in your first visit to Barcelona.
The TRAM lines
The TRAM has two different networks, called Trambaix and Trambesós, and 6 lines, 3 in each. The Trambaix has lines T1, T2 and T3 and runs through Barcelona city and other cities in the surrounding area: Hospitalet, Esplugues de Llobregat, Cornellà de Llobregat, Sant Joan Despí, Sant Just Desvern and Sant Feliu de Llobregat
The Trambesós has lines T4, T5 and T6 and runs through Barcelona city, Sant Adrià del Besòs and Badalona. I like travelling in the TRAM since you see all the street and the surroundings from a ground level like if you were walking in a fast pace, it is between the train and the bus.
The line that you will probably use is T4, since it goes to les Glòries -a shopping centre-, Poblenou neighbourhood which is becoming a trendy place plenty of bars and also el Forum, where there are concerts in different times of the year and there is another shopping centre -Diagonal Mar-.
The below is an example of line 4, and some stops there are connections to other tram lines and it is also indicated if there are metro stations or train stations nearby and in which line. In yellow and red the metro lines, and in blue de R1 line, a train line.
Tickets to travel in the TRAM
You must have a validated ticket to travel by TRAM, the metro and bus cards are also valid for the TRAM, bear in mind that Barcelona city is zone 1 but if you go out in a different zone you will need to get a travel ticket for as many zones as you travel through. Check the metro cards to see which ones is best for you.
The operating hours for the tram are Mondays to Thursdays from 5am until midnight and Fridays, Saturdays and public holidays from 5 am to 2 am.