Are you about ready to quit? More importantly, do you want to quit, but you don't want to pour gasoline and then set fire to the bridge behind you? There is a way to resign and not ruin everything, as revealed in this piece on the eponymously-named I-resign.com.
One of the first things to do is make sure you are actually committed to quitting. Are you sure? Have you made sure that all avenues open to you at your current job have been explored? Do you have another job lined up? In other words, don't take it lightly and carefully weigh your options.
Second, if you resign orally, make sure you know what you're going to say and then stick to the script. Be aware that your boss is likely to start asking you questions and probing to find out more. Don't give away anything that might get you in trouble.
If you resign in writing, be careful about what you write. Kanji gives you templates and suggestions about exactly what should be in the letter. Keep it short.
Most importantly, try to leave on the right note. Don't leave major projects left open. Try to co-operate with your boss and help train the people who may be coming in to replace you.
Just because you think it hasn't worked out at the place where you work now, it doesn't mean you have to destroy all of the relationships you've built up. If you resign carefully, you can preserve a little bit of dignity.