If you want to resign from the role you currently have because you have found a new job or looking to do something else then you always need to ensure that even if you hand your notice into your Manager verbally you should always confirm this in writing even if it is in a basic format.
It is not essential to explain why you are resigning from your role, you can keep it to the basic facts of when you are leaving from what role but it is always nice to keep things friendly and end on a good note. Worth remembering especially if you may have to ask for a reference in the future.
Please see below for a basic format of a resignation letter:
Basic Resignation Letter
Dear Sir/Madam, Name of employer, To Whom It May Concern:
Please find this letter as my letter of resignation from my position of (job title).
My last working day will be (when) in accordance with my terms and conditions.
(Optional) I am leaving my role as (job title) due to (state reason (constructively) as to why you are leaving.
I would like to take this opportunity to thank you for providing me with the opportunity that I have had. I have enjoyed my time with you and wish you and the company every success in the future.