Resignations should be dealt with professionally and calmly. Burning bridges will wave goodbye to good references and paths will inevitably cross again.
Managing your resignation from a job must be done as carefully as you would handle any other business endeavour. Always book a private appointment with your boss to let them know that you are moving on. Don't just drop by their office to tell them such important news.
Be kind and positive when you quit: your manger is no longer your boss of the past but part of your network of the future. People tend to remember just their first and last impression, so be professional.
Emphasise the positive about your time in the company but add that it's time to move on, you've found an opportunity that 'fits you better'.
Offer to help during the transition; seeking out or training up your replacement.
Accompany any spoken intent with a formal letter of resignation stating when your last day will be; it looks more professional, and will clear up any uncertainties about notice periods.
Resist the urge to quit spectacularly, sweeping into your boss's office and telling them exactly what you think of them, is sometimes strong; but such sweet revenge soon sours.