You can buy a ticket on-board or at a nearby kiosk. In Lisbon, one-way tickets cost around €1.50–€2 or €6 for a day pass. You can also pick up a Viva Viagem card in Lisbon, which gives you reduced fares on all public transportation in the city.