Every situation is different, some people can simply tell their boss, "Hey, I've got to give you my two weeks, my last day is going to be on the 5th." Others are not so lucky. I think that most managers will appreciate a letter of resignation, some times a letter isn't necessary, but as long as you give some notice it will help.
The length of notice varies, many of the entry level positions could probably squeak by with only a week, but some corperate run places will require two weeks or they get upset. I would avoid giving any more than two weeks notice, no matter your position, any longer and things get awkward quick.
The letter should be short, sweet, and to the point:
At this time I must tender my resignation. My last day with Company XYZ will be on (two weeks). I appreciate the opportunity to work for your company. I hope my contributions have been valuable. I wish you all the best in the future.
You should type your letter, then sign it at the bottom. Address the letter to what ever you would typically call your boss, "Mr. White," "Mike," or "Chef Paul," are just possible examples. It would be strange to address a letter to your boss using anything but what you normally call them.
Obviously, if you don't wish them all the best in the future, maybe leave that out, but don't include too much of anything else:
- Avoid the "why"
- Avoid anything personal (leaving for medical reasons, new job, marriage, moving, baby, etc.)
- Avoid anything that made you mad (bad management, lazy coworkers, poor pay)
- Avoid anything long and drawn out, keep it short!
- Avoid handwritten letters, typed is professional - let's keep it professional, not personal.
When the time comes to try to get hired again they'll say, "Oh, that guy's solid," or "she won't walk out on me or not show up." Just give notice and write a simple letter!