Here’s everything you need to know about how to write a resignation letter, along with a free sample to get you started.