Barcelona has a well-developed integrated public transport system that caters to the needs of tourists remarkably well. The metro with nearly 120 stops connects almost all of Barcelona. Transports Metropolitans de Barcelona (TMB), the company that runs the city bus network, with its 100 lines covers every corner of the city. For excursions outside of Barcelona, you can use AVE fast trains of Renfe network.
Most of the attractions can be accessed by walking as they are close to one another. For some attractions like Park Guell or Park Guell, bus or metro is a great choice.
As a tourist, you have no need for a private car. Having your own private transport can be a disadvantage parking facilities in the old city as well as in the city centre are rare and expensive.