For general information about formatting addresses when mailing to Germany,
you should see the
Germany section
of the
International Mailing Address Formats page.
Look up postal codes (German equivalent of what in the U.S. are "zip codes")
Some additional notes:
I would tell you more of these guidelines instead of summarizing and skipping so much, but when I think about how much more there is to say on the subject I feel very tired.
Disobeying these rules is not likely to get your letter thrown out in the trash, but it may confuse the address-reading machines and cause your letter to travel slowly through requiring human processing. Perhaps your letter could even go to the wrong address (but probably not.)
Really we should be glad that Deutsche Post has told us in such great detail how to best please their machines. Probably every country's postal machines have as many fussy quirks and details that one should consider for best results. It is only unfortunate that to remember so many machine quirks and machine preferences, we probably need to be machines ourselves.