Leaving Oberammergau we used the train as we were going to Memmingen. We had to change trains in Munich, but it was very easy to do that. Good website to use for train times is www.bahn.de. It is also a good idea to purchase you tickets online a few days before your trip as you can get your ticket for up to 50% cheaper.
We used the RVE bus to get to Oberammergau from Garmish. A very nice ride through some scenic countryside.