If you are looking to do it cheap, I would also suggest not going to Munich during Oktoberfest. You will have a great time in Munich whenver you visit, so for your first visit on a budget, go sometime else.
The trains are great - look into a Eurorail youth saver flexi-pass (I think that is what it is called.) It allows you to use the train a certain number of days in a couple month time-frame. I think there is also a discount if you will be traveling with a "buddy" at all times.
Hostels are also a great idea. There is a budget travel site on this fourm that may also have some good ideas for hostels in Germany.
Have a great trip. You will have a blast!