Disclaimer: This is by no means exhaustive information, nor is it expert advice. Just some nuggets of info we picked up along the way.
DB Bahn is the the German branch of Bahn, the big European company that runs the trains. Most of the train travel is split into two classes of travel. the S-Trains and the U-Trains (S-Bahn, and U-Bhan respectively). The U-Trains are local trains. The connect the various places of the city. Most are underground or overhead. There are also Trolley's at street level which also function on the same local ticket. When you buy a local ticket you buy it for an area. AB, or ABC depending how far you want to travel. If you two points of travel are within the B area, you just need an AB ticket. Going one way will cost you €3. If you are doing a 2-way journey it is almost always better to buy an all day ticket €6.20.
You must always have a validated ticket when traveling local trains. If you are caught without one it is a €40 fine payable on the spot. The train stations have ticket booths (with an english option) for purchasing your ticket. The trolley's also have ticket machines in them (coin only). Once you buy your ticket you must "stamp" the ticket. This is because you can buy tickets in advance. A good idea is to buy a couple All Day tickets and keep them in your wallet. Then when you want to use them, just pop one into a stamp machine and it's validated for the day. This part is important, because if you have a ticket but not stamped, it's as good as not having a ticket at all. A final note on local trains is that you are free to use the S trains, just as long as you get off before you leave your valid area. They are often less crowded and if you can time it right will get you where you need to go much sooner.
S-Trains or S-Bahn is for out of local travel. This is broken down into regional trains, and ICE high speed trains. The regional trains are slower, and are used to connect the smaller parts of the region. We took a couple from Füssen to Nuremberg. The high-speed ICE (although I was disappointed when the fastest we got going was only 200Km/hr, most of the time it was < 100) connect major hubs. We took one from Nuremberg to Berin. When buying tickets always look for specials. To buy a regular fair ticket from Füssen to Nuremberg it would have cost us €120 each. However, with Oktoberfest going on there was a wonderful Bavaria ticket. For €36 both of us could travel freely for a day in the Bavaria region, a savings of €204. If you can get these deals you can save a ton. Initially we thought of buying a Bahn savings card. You pay an upfront fee for the card and get 25-50% off fairs depending on how much you pay. Although the 50% card seems to make more sense at first, it only apply to regular fares (the €120 ticket for example). The 25% card will apply to much more, although not all sales. So if the Bavaria ticket didn't exist we could get a nice 25% off our fare. With this information we went to go get one and a couple tickets when booking our trip from Nuremberg to Berlin. After flustering around for a while with broken english and no German on our part we discovered that there was yet another class of tickets. As a non-European you can purchase blocks of tickets. We bought a block of 5 tickets (one from Nuremberg to Berlin, and 2 2-way trips) for €350. This gives us 5 days to use the DB Bahn as much as we want and to go wherever we want. You can buy up to 10 days if you'd like. That ticket is then good for 30 days. When you want to use a day, you simply write down that day on the ticket to show that day has been used. This option was considerably cheeper then if we had gone the 25% card route. We didn't know about it since it wasn't on the DB-Bahn site to be found. Only the nice lady at the ticket booth found it for us.
With your S-Bahn ticket, upon arriving in a local area, you are then entitled to a local ticket. We haven't got this part quite figured out. The advice we got was that the S ticket was good for local travel. I think what you need to do is take that S-ticket to ticket booth and obtain a local U ticket which you then have to get stamped. Pretty sure we were free loading for our first few stops in places. Wooops.
Oh, as a final tip, if you are on an ICE train and there is a "Destination"-"Destination" sign light over one of the seats, that means it has been reserved for that leg of the journey.