A written notice that you are leaving. By law, a contract with no end date can be ended with 2 weeks' notice. Company rules usually ask for 1 month.
When you decide to leave.
Hand it in in writing, with the date, and keep a copy. Use your paid leave before your last day.
General explanation, for guidance. Rules and amounts change: confirm with the responsible office.