You can buy your ticket from the driver or preferably the conductor, and you can only pay by card. On the tram you can buy tickets which are valid for 1 hour, or up to 48 hours. If you want a ticket for a longer period, you will need to buy it at the ticket office in the bigger stations.