QUOTE(pike @ Mar 18 2008, 1:33 pm)

"Die Kündigung muss schriftlich erfolgen. Im übrigen sind die gesetzlichen Vorschriften zu beachten.".
The termination must be in writing and must be according to legal codes.
I guess that last bit refers to the legally defined cancellation period, which is 3 months.
More information about cancellation of rental
contracts here (only in German).
And here's the
template for the letter that I used to cancel mine:
QUOTE
[Your address]
[Their address]
[date]
[Reference number for your apartment]
Sehr geehrte/r [Name of Person],
hiermit kündige ich den Vertrag für die oben gennante Wohnung fristgerecht zum [date]. Ich bitte um eine schriftliche Bestätigung der Kündigung.
Mit freundlichen Grüßen,
[Your signature]
[Your Name]