Welcome to Zurich. A single ticket is valid from the moment you pay - the time is printed on it. A "fast" ticket (short trip CHF 2.40) is valid for 1/2 hour, regardless if you take more than one tram, or go somewhere and back again. However, it is restricted to the list of stations noted on the ticket machine where you bought it, which is - of course - different at every stop, - so it helps if you know where you're going. You can also buy multiple tickets to validate at the machines at many kiosks, vbz ticket offices and train stations; ie. 6 short or long trips on one card.You validate them as you need them. Or monthly passes... CHF 75.- (personal), CHF 80.- (if you want to share it with a spouse, friend). With this pass you can just hop on practically wherever you want within the city (Zone 10)... Maybe this link will help:
http://www.zvv.ch/_tourist_e/tickets.asp. There are reductions if you have a half-fare card (Halbtax-Abo), which is a yearly card available at train stations. Confused?