Berlin has an extensive and efficient network of public transports. The U-Bahn (underground/subway), the S-Bahn (regional & local trains), buses and trams are all under the control of the VBB (the local transport authority). There are three concentric fare zones, A, B and C, but most people will probably not venture beyond zone B anyway, except for going to Schônefeld Airport, which is in zone C.
There are more than 20 tram lines running through Berlin, mainly in the eastern part of the city. Metrotram lines run more often than the regular trams.
Single tickets are valid for one journey to be completed within two hours and can be purchased at the machines in all stations as well as near bus/tram stops and vary in amount depending of the zone(s) travelled, but if you plan to travel several times during the day then do get a day ticket (tageskarte) which offers great value. Do note that the ticket machines do not accept payments by card, unless you have a Maestro symbol on yours, so you must use coins or notes. There are no gates in the U-Bahn and S-Bahn so remember to punch the ticket as you enter the station or board the bus/tram at the start your journey or your ticket will not be valid. If you have purchased a day ticket then you need to punch it the first time you use it.