1. Review any agreements you've signed before leaving the job. The agreement may have included noncompete or nonsolicitation clauses, so you may not be allowed to work for certain employers. You don't want to quit your job only to find out you are not legally allowed to work for the employer whom you think you are headed.
2. Don't tell your co-workers about your plans. One of your co-workers might accidentally disclose the information to your boss, and if you change your mind about leaving then the consequences of your blabbing could be unfavorable.
3. Give plenty of notice. Give at least 2 weeks, but you may need to give more than a 2 week notice if that is what is required by your employer.
4. Write a letter of resignation but also notify your boss in person. In writing and also in person, thank your boss for the new skills you acquired while working for him or her. If you find yourself wanting to tell your boss about all of the frustrations you had while working at his/her company, ask yourself what you will gain out of doing that.
5. Be prepared to leave. Even if you are expecting to work 2 or more weeks after you give notice, your employer may still ask you to leave immediately. So, make sure that you have all your ducks in a row and that you are prepared to leave the day you give notice, if need be.