Barcelona is blessed with a truly excellent public transport system.
The metro is clean, easy to understand, cheap, services run very frequently, and it covers almost the entire city. In the entrance of every station are ticket machines. The best deal is the T10. It's a ticket that gives you 10 trips, for 9.95 Euros. Multiple people can use the same ticket, just pass it through the machine for each person.
The bus system is integrated with the T10 so you can use the same ticket on the buses. In fact, you can come out of the metro and get on the bus and it still counts as a single journey. Remember you still need to punch your ticket in the machine on the bus, but it won't deduct a trip. Very fair!
While the metro is easy enough to figure out, buses are always a bit more complicated. That's where you need an app to help. Moovit is, no hyperbole, life changing. OK, slight hyperbole. But not much. You'll be travelling round the city - any city - like a native. Tell the app where you want to go, and it offers you various routes on public transport to get you there. It draws them on a map, and gives real-time arrival times for buses, metros and trains.
Further afield, the trains to nearby towns are excellent value. There are routes running up and down the coast, as well as inland. Local trains are called "cercanias". You can use your T10 within zone 1. Further out, just buy a ticket from the machines in the stations. They're very cheap. Remember to hold on to your ticket until the end of the trip - you'll need it to be able to exit the station.
Popular destinations for a day trip include Sitges and Tarragona (south of the city), and any of the coastal resorts on the coast north of the city. If you love the beach but hate the crowd, make like a local and jump a train north. The entire coast is one long beach.
Finally, taxis are cheap, reliable and plentiful. Except for trips to/from the airport, where they're expensive, reliable and plentiful. Check out the Airbus, metro, and train as alternatives.