When someone wants to change jobs, they usually focus on getting a new job and don't spend much time thinking about how to quit their current one. However, it's important to recognize that quitting your job the right way can be very helpful for future career growth. You may need to use your current employer for references and maybe even for networking opportunities, so leaving on the best possible terms is a good idea.
When to Give Notice
The custom is to provide at least two weeks' notice of your intention to resign from a job. This helps to minimize the negative impact on your employer's business operations. Of course you will want to have secured a new position for yourself before quitting your current job. If you suspect your current employer may need you for more than two weeks because of a complex project you're working on or because of a lack of available talent in your profession, you may want to try to negotiate with your new employer to start more than two weeks in the future. This will show your new employer that you are a person of integrity and can help maximize the value of the relationship you spent so much time building with your current employer.
Telling Your Boss
It may be one of the most uncomfortable things you'll have to do, but it is best to tell your boss in person. Not only is this the more polite way to deliver the news, but it will also give you an opportunity to address their concerns about your departure right away. You can offer to help interview and/or train your replacement if that would be feasible. One of the goals of your meeting with your boss should be to elicit their feedback about your decision and any concerns they have.
Writing the Resignation Letter
After telling your boss in person about your decision, the next step is to write a formal resignation letter. This letter should express your regret about leaving and reiterate the date your resignation will be effective. It is important to keep this letter as positive as possible as your boss will likely refer to it if he/she is asked for a reference about you in the future. If you have a specific complaint about someone at the company or a practice the company has, it is better to air those concerns in person. You may even inquire about whether your company offers "exit interviews" - a formal method for someone at the company to get your feedback about the organization before you leave.
As mentioned previously, one of your first goals when announcing your decision to leave a company is to address any concerns your employer may have about your leaving. Even if you do satisfactorily address those concerns by helping them get a replacement up to speed, your boss may still have negative feelings toward you for the first few days after your announcing your decision. Rather than using this time to "slack off" at work, it would be wise to use it to show that you are a dedicated and committed person who is still interested in your employer's success. Your goal should be to leave your employer with a very positive impression of who you are. In the last few days before leaving, you may want to ask your employer for a written reference letter.