If the company you are working for has more than ten employees, there is a law called “Kündigungsschutzgesetz” to protect the employees. There is a special protection for members of the employee representative committee, pregnant women and mothers with very small children., employees in their parental leave and people who are severely handicaped. The longer you are working for a company, the longer is the time needed before your contract can be cancelled. There may be special regulations in your collective agreement, please read it carefully.
More information can be found at: