The Sociedade de Transportes Colectivos do Porto (STCP) is the operator that manages the network of buses and trams in the city.
To ride by bus in Porto, you can purchase the intermodal Andante ticket, which is also valid in the Porto Metro and CP Train, between Espinho and Valongo - and load it with individual journeys. A Z2 trip (two zones, the minimum, corresponding to travel inside the city, for example) costs € 1.20 - you can also purchase your ticket inside the bus, for € 1.85, however that ticket will only be valid for the journey in which it is acquired.
The most practical alternative for those visiting Porto is to use the Andante Tour, which exists in two versions: the Andante Tour 1 costs € 7 and is valid for 24 consecutive hours after its first validation; the Andante Tour 3 is valid for 72 consecutive hours after its first validation and costs € 15. Both tickets enable access to STCP buses, metro and train and allow for an unlimited number of trips. All you have to do is validate your Andante Tour ticket for each every journey.
You can buy the Andante Tour on STCP buses (Andante Tour 1 only), Andante shops, STCP service stations, at the CP train booths selling Andante journeys and at Airport, Porto and Maia Tourist Offices.
STCP has another interesting ticket for those visiting the city, Porto VIP Passport, which allows access to Porto's main cultural and leisure spots, with preferential treatment, and suggested itineraries for tourists.