If you have to leave a job for whatever reason make sure you do it with professionalism. It is never good to burn bridges!
I give two-weeks' notice and make myself available to help in the transition period as much as I can. If there is an overlap I offer to train the new person.
In one job I had I was laid off as a result of government downsizing, but that is still no excuse for being unprofessional. I want to leave on good terms and to be able to use the time I was in the position as a positive experience and a positive reference.
When you leave a position it is also a good time to ask for a reference letter for your records.
Here in an interesting article1 entitled 15 ways to leave your job and another article2 entitled Seven things NOT to do when you leave your job (no matter how tempted you are).
And what if you are fired? Here is an article3 that deals with that situation.
1 Lorenz, Kate, 15 Ways to Leave Your Job, http://www.careerbuilder.ca/CA/JobSeeker/CareerAdvice/ViewArticle.aspx?articleid=174&cbRecursionCnt=1&cbsid=2cffe559602d4f0d8e2580c6348a5ee0-244501006-JG-5&ns_siteid=ns_ca_g_leaving_a_job_on_good_, (accessed September 30, 2007)
2 www.sixwise.com, Seven things NOT to do when you leave your job (no matter how tempted you are), http://www.sixwise.com/newsletters/06/01/25/seven_things_not_to_do_when_leaving_your_job_no_matter_how_tempted_you_are.htm, (accessed September 30, 2007)
3 Bruzzese, Anita, Gannett News Service, USA Today, How to Leave a Job Properly, http://www.usatoday.com/money/jobcenter/workplace/quitting/2002-11-20-leaving-job_x.htm, (accessed September 30, 2007)