An employee is permitted to resign at any time (usually two weeks' notice is required), but an employer that tries to fire an employee without rational, reasonable, and socially-acceptable cause may lose an abusive-dismissal court case.
(Contract non-renewals may be a different matter; but if the contract is a full-year contract, and has been renewed at least once, then compensation-typically one month's pay for each year worked-is often negotiated).