Check your employment contract first. Standard notice periods are: 1-2 weeks for entry-level roles, 1 month for professional roles, and 2-3 months for senior management. In the UK, the legal minimum is one week after one month of service. In the US, two weeks is the professional convention with no legal minimum. If your contract says 3 months, give 3 months unless you've agreed otherwise in writing. Giving less notice than required can affect your final pay or references.
Do not say anything negative about your manager, colleagues, or the company. Even if every word is true, it creates a record that can affect references and future employer conversations. Avoid stating your reasons unless they are genuinely positive ("I'm returning to education"). Do not make ultimatums or demands. Do not write the letter when you're angry. Keep grievances out of it: the resignation letter is a professional, formal document that exists to start the exit process cleanly.
You are not legally required to explain your reasons for resigning, and in most cases you should not do so in the letter itself. If you want to provide context, do it in your exit interview or in a conversation with your manager. The resignation letter should be brief and factual: you're resigning, here's your last day, here's how you'll help the transition. Reasons invite negotiation or create a record you may later regret.
In most employment relationships, leaving without the notice set in your contract is a breach of contract unless your employer agrees to waive the notice period. However, if you are resigning because of serious misconduct by the employer (constructive dismissal), different rules may apply. If you need to leave quickly, the cleanest approach is to have a direct conversation with your employer requesting that they waive or reduce your notice period. Many employers agree to this. If you are unsure of your position, check with an employment lawyer or, in the UK, Acas.
Have the conversation first. Resigning by letter before speaking to your manager is considered poor professional practice in most workplaces and can damage the relationship you need for a future reference. Use the letter to formally document what you agreed in the conversation: the notice period start date, your last working day, and any handover commitments. The letter follows the conversation. Source: CIPD employment relations guidance, Acas resignation best practice (acas.org.uk).