There is no specific way.
You could say:
Dear [name of manager],
Please note that I am hereby giving you two weeks' notice as from [date] that I shall be leaving the company/resigning from the company. My last working day will be [date].
[If you have any outstanding annual leave, you should indicate that this time is still owing to you]
- For Teachers