In German you may say Auf Wiedersehen or Guten Tag when leaving. Both seem rather formal and may be inappropriate in a non-formal context.
What would be the alternatives? In what context can we use each of them?
There is a myriad of answers for that. Just try to summarize:
Also, loads of foreign language phrases are used (whatever someone thinks is "cool"), like:
Or anything else, I've even heard friends leaving with:
So, you see, there is no exact answer to that. Just listen to what people around you are saying, as it really varies from region to region, age to age and even from clique to clique!
Usually, "tschüss" is accepted everywhere, though, especially if you're not a native speaker. It probably isn't a good idea trying to pronounce "pfiat di" with a foreign accent. ^^
Edit I've added some marks to make the usage clearer.
° = pretty informal, maybe a bit immature
°° = very informal, use it only with good friends, may also be considered immature
°°° = usually way over the top for use by yourself, but don't be offended if you hear it
Guten Tag as a closing salutation is by far not as widely used as Auf Wiedersehen, which should be fine for all purposes where you would also use Sie instead of Du.
For a generic salutation that is more informal, you could use "Tschüss!", which I would translate as "See you!" or "Bye!". In southern Germany (especially Baden-Württemberg), there's also "Ade!" (emphasis on the e), and younger people often use "Tschau!".
Tschüss, Ade and Tschau have the same roots, originally even with a religious connotation (french adieu, "be with god" → atschüs → tschüss), but that is long gone.
I almost always use Schönen Tag noch, followed by Tschau or Tschüss. I wouldn't use the latter without the former however, that seems impolite to me.
Edit: Look at those answers flying in! I'd like to add that I've never heard Guten Tag used as "Goodbye" except by other foreigners.
Germans say "Tschüß", most commonly, or one of its variations ("Tschö", "Tschau", "Tschöß", depending on the region).
To complete the answers already given: On the phone, you don’t say »Auf Wiedersehen«, but »Auf Wiederhören«. Even some German native speakers get this wrong.
Occasionally you may hear "Viel Spaß (noch)".
The informal form really depends on the region. Tschüss is probably fine everywhere, but in other areas people will prefer Servus, or others.
Tschüss, or the Rhineland variant Tschöö originate from the French "Adieu" (As an aside: Much of Germany was occupied by France off and on over the last few hundred years, so there is a lot of French influence in the regional German of the Rhine area, and some of it has spread to Standard German).
An informal "see you" can be translated to "Man sieht sich" or "Bis dann"/"Bis denn(e)" (until then, so long). When you're out with your pals you can also hear "Hau rein" or "Mach's gut".
Baba (with stress on the second syllable) is very common in Austria. (Informal, not among strangers, similar to Servus)
Guten Tag isn't used as an ordinary way of saying good bye anymore. Actually, the only times I can remember hearing it used as such was when the parting party had to restrain themselves from storming out and slamming the door.
Da ist die Tür! Mach die Tür von draußen zu.
Wolltest Du nicht ins Kino gehen? (deine Mutter besuche/nachsehen, ob es noch regnet/ ...) Ich glaube Dein Bus geht gleich.
to a third Person:
Herr Dwight wollte gerade aufbrechen.
In Leipzig (and maybe in the whole Sachsen), you can use as well, i never saw it written, but you hear here a lot, something like "ciao-i", that sonds like "schau-ui"