Always give enough notice to your employer. This will give them time to start the process of finding a replacement, and will also send a message to your new employer that you have values and will not leave at the drop of a hat. The higher up in the company or the longer you have been with them, the longer the notice should be (and is expected).
Submit a professional resignation letter in person. The resignation letter should be short and to the point. Be sure to mention how much you have enjoyed working for the company, especially if you've been with them a while. You want your resignation letter to be professional, to the point, and not something that could allow you to return there one day (always keep your options open).
Finish up any outstanding items (for the company) that you have been working on. Showing commitment to your responsibilities to the very end will be remembered by those around you, by your peers, your manager and your owner.
Do not mentally check out before your last day. Instead, show a final amount of respect and commitment to your company and be willing to go the extra mile to help train someone who may be in to replace your position.
If you are leaving for a new career with better pay and benefits or a better work schedule, etc do not talk about this openly in front of your current team. It will be disruptive, and could be seen as an attempt on your part to steer away other teammates.
Be truthful in the exit interview, but do not give in to the temptation to vent about everything that has gone on in the past. If you have constructive feedback, share it. Your employer wants to know why you have chosen to move on so that they can continually improve on and tighten up areas of their workplace.