The tram you'll use the most in Istanbul is the T1 Bağcılar- Kabataş tram. (Click here for a map ofIstanbul's Metro, tram, Tünel & Funicular system.)
Trams run about every 10 or 15 minutes from 06:00 am until 00:00/24:00 (12 midnight) daily. Here's how to pay the fare.
This route goes from the district of Bağcılar via Zeytinburnu on the shore of the Sea of Marmaranortheast through the Byzantine city walls at Topkapı(the Cannon Gate, not the palace), then eastward via Yusufpaşa/Aksaray, then past the Grand Bazaar (Kapalı Çarşı) and along Divan Yolu to Sultanahmet—theHippodrome—the historic center of Old Istanbul.
From Sultanahmet the tram continues north past Sirkeci station and Eminönü (ferry docks), across the Galata Bridge over the Golden Horn to Karaköy Square (Galata, starting-point for the Tünel up to Beyoğlu's Istiklal Caddesi).
From Karaköy the tram continues to Tophane, near the Istanbul Modern Art Museum, then to Kabataş, with its "Sea Bus" catamaran ferry dock (closed until 2018) and Füniküler (funicular tram) to Taksim Square.
Here's what the signboard on the front of the trammeans:
CBG.A.Ö.Y: Westbound/outbound tram going only as far as Cevizlibağ-Atatürk Ögrenci Yurdu station (just outside the city walls), not all the way to Bağcılar. You can take it for any destination within the city walls, but if you're going to Atatürk Airport, you'll have to get out at Cevizlibağ (the last stop) and wait for a Bağcılar tram to take you four more stops to Zeytinburnu.
Eminönü: Eastbound/inbound tram going into the center of the city (Laleli-Üniversite, Beyazıt-Kapalı Çarşı, Sultanahmet, Sirkeci) but only as far as the Eminönü ferry docks, not across the Galata Bridge to Karaköy.