Keep it to yourself. Once you've made the decision, don't go blabbing it all over the company until you have notified your immediate supervisor. Give her or him time to absorb and process the information.
Plan to give notice. If you want to leave under the best possible terms, don't leave your employer high and dry, scrambling to cover your position. Give at least two weeks’ notice so your boss can prepare to have others cover for you, or have time to groom a replacement.
Ask your boss for an appointment to discuss an important matter. Poking your head in and asking for a moment of his or her time will do. If possible, wait for a time when your boss will have a few moments to focus on your news.
Be prepared, direct, and polite. Rehearsing will help you be ready when your supervisor has you in to talk. (Some sample approaches are given in the full article; see link below.)
Be prepared to discuss. Your boss may have some questions. Or your boss may make a counter offer. Being polite and dignified about your resignation could make this possible. If staying is an option, what would make you open to it?
Emphasize the positive. Be honest, but polite. You can be truthful without being cruel.