You can buy your ticket from the tram driver (cash) or from ticket machine. If you plan on using the tram a lot or other transportation (bus, metro, train, funicular, Santa Justa Elevator) it cost 6,50 for the first day, and 6,00 Euro for every day after that. The 24 hour pass is rechargeable.