Ending a rental contract yourself
If you want to cancel the rent as a tenant, you can do this through a signed letter to the landlord, stating that you want to end the rental agreement. Another option is to summon your landlord (with a letter from a process-server).
Of course, you still have to deal with a notice when cancelling your rent. Normally, the notice equals the term of payment, which has been written down in the contract. The notice can have a timespan of one to three months maximum. Unless differently stated in the rental agreement, the cancellation of the rent needs to be done before the first day of the month.
In case of a temporary rental agreement, the tenant needs to complete the agreed upon rental period.