There are some really cheap ways of travelling with German railways. As lukee already mentioned (and the link works fine), you can buy tickets online and pay with your credit card, but there are still cheaper options, like the "Länderticket" ("state ticket") which allows you to travel on any railway route (except the fast trains) within one federal state. And there's the "weekend ticket" ("Wochenendticket") which allows up to five persons to travel on slow trains throughout Germany on a Saturday or Sunday. Me and my girlfriend made it from Bavaria up to Berlin with that ticket within less than 10 hours, paying 38 euros only.
Public transport within the larger cities is excellent. I lived and worked in Berlin for 7 years, and their system of transportation is ingenious. I think they have the best, nicest, and cleanest subway ("U-Bahn") in the world. For tourists, there are one-day, three-day and week tickets available at the vending machines, so you don't have to worry about paying extra fares on busses, trams, and so on. One ticket will be valid for all of that, and most major cities in Germany offer you that service. In case you really get stuck in the woods, ask the locals for a central taxi call; most communities provide that service, and you just give them a call, and minutes later, a taxi will pick you up.
Out in the countryside, however, public transport is not that much convenient. In villages, there are usually three or four busses going to the next larger town, and if you miss the one you've been heading for, the only choice is take a taxi or stay another day. But the locals will inform you about which bus to which direction to take, so you'll arrive at your destination smoothly and safely. When you're somewhere in the countryside, tell the bus driver where you REALLY want to go to. He/She'll sell you the priceworthiest ticket that's available. Like, in my area, you could pay 3.40 euros for a bus ticket to the next railway station, and then pay some 7-something euros for the railway ticket; but there's a day ticket available that goes for 7.20 and gives you unlimited use of public transport in my area.
So that's about it. Count some 8 to 10 euros in for each day you want to use public transport in a specific area, and try to use Deutsche Bahn as often as you can with a Länderticket or Wochenendticket.