Take the tram in Amsterdam
Information on taking the tram for Tourists in Amsterdam
You can buy tickets in the tram (or bus).
But if you want to travel with the tram more often you could also consider buying an “anonymous OV chipkaart”. The anonymous OV-chipkaart is a plastic card...