The Untergrundbahn (U Bahn) and Stadtbahn (S Bahn) are the two types of railways operating in Berlin. The difference being that the S Bahn stations are further spread apart and hence is faster over longer distances. Both types have about 7 or 8 different lines that operate throughout the city connecting at different points. Combine these excellent public services with a host of bus and tram networks and one can travel effortlessly through Berlin. The trains operate from 04:30 to 01:00 but night buses follow the U Bahn lines at 30 minute intervals when the trains are not operating at night.
Tickets are available for different areas of Berlin and various lengths of time. But I have found the best value ticket to be the Monat kard (€72). I generally use the U Bahn 3 times a day, so over a month’s period each trip works out at less than €1 less than half the price of a one way ticket.