Once you finally make the decision to quit your job, there are several ways to do so. But before make your dreams come true and smash your (soon to be ex) boss’ head on the floor, you have to think about what would happen if something goes wrong with the choice you made.
You have to leave an open door at the company you are leaving. This is your safety net, especially on the kind of job where you spent a few years and you are maybe a (somehow) valuable asset for your company. If you spent little time, or you had several problems, there is no way you can quit your job with an open door.
Be honest (unless it hurts) - Let them know you are going to quit your job and the reasons, be it due to personal growth, health, a better job, a better lifestyle or an offer you can’t reject.. If you are quitting your job because you can’t stand your work, everyone is horrible to you, or something like, tell just a little more.. Soft… Version or maybe even lie!
Two week’s notice - First things first. You have to let your company know that you are quitting your job at least two weeks in advance (if you can give more time) before actually quitting, so they can have time to look for someone to fill in and to give the new employee (at least) some training. They probably will ask you to train your replacement, if this is the case, try to train him / her in the best possible way.
Finish your work - Don’t be one of those persons who resigns and get lazy with their current work! Until you actually stop working at your company, you still have responsibilities to fulfill. If you have a job pending, try to solve it before you leave. If you have some work which requires more time than you have, give some pointers, advances and all the things needed to be done, to the person who is going to take care of it after you.
Be grateful - Have respect for the people who give you this job, let them know you are thankful for the opportunity given, for the knowledge you acquired, and for the time and resources they invested in you.
Be available - Let them know that if something comes up during the first couple of weeks or so, you will gladly help them (you can give them some pointers; not actually show at work) and give them your personal mail or phone (if you haven’t already).
Say goodbye - Send an email (a nice one) to all your coworkers, be (once again) grateful with them, remember the good times (leave out the bad, nasty and ugly ones), and in person, say goodbye to the boss on your last day.
This might sound like too much, especially when you really, really want to quit your job no matter what, but you’ll never know what will happen next and you might find yourself struggling and wishing to come back. Hope this helps!