Quitting your job can be a difficult prospect: on one hand, you've likely lined up something better (or at least have good reasons to quit your job), and on the other hand, telling your employer is bound to be unpleasant. Nevertheless, it is a necessary step to moving forward.
What to Do Before and After Quitting
The first step to quitting is checking what obligations you have with regards to your job. You likely signed some sort of contract upon joining the company. Pull it out and read it over: it may contain some expectations for how you should inform your employer that you're moving on. In particular, look for any requirements on the length of the notice that you need to give. You want to make sure that you meet all of your contractual obligations as you wind down at your old job.
You'll also want to think about the ideal way the transition can take place, even if you aren't sure that you'll be able to implement a transition plan. If, for instance, you know that your employer will need to replace you, you can help find your replacement and get him or her up to speed before you leave. Consider what you need to do in order to finish any projects that you're currently working on, and write out a plan that you can present along with your resignation. This will showcase your leadership skills, and can provide a good foundation for getting positive references after you leave.
When it comes down to actually resigning, notify your employer of your plans to do so as far in advance as you feel comfortable. Employers, of course, prefer as much notice as possible. However, you may not be prepared to announce that you're looking for a new job early in the interviewing process. It's usually best to set aside time for actually sitting down and telling your manager of your plans to leave, where you can also discuss how the transition will proceed. If your change of jobs is particularly unexpected, you may need to plan for several discussions about completing projects and winding down your work.
As part of the resignation process, you'll need to submit your resignation in writing - for many companies, a resignation letter is the trigger for the human resources department to start the exit process. That process can stretch out over the entirety of your notice period, depending on the company you've been working for. During that period, however, make sure that you're continuing to work to the standards you've met throughout your employment. Slacking off because the end is in sight won't win you any friends at the company, and may also burn some bridges for future references and other help.
The Exit Process
The exit process is a necessary evil. While it can seem like a waste of time to complete forms for a company you won't be working at a week from now, doing so will prove that you are a professional. An exit interview can even be an opportunity: you can tell your employer the details of why you're choosing to move on. Such feedback should be polite. You should also ignore any temptation that you may have in openly pointing out what would make your employer a better workplace, even as you're leaving, because that fuss could easily follow you to a new job.
The Bottom Line
Announcing your new position outside of your past employer should be equally subdued and done only after your manager and team have been informed. Social media posts too early in the process can definitely cause problems. And with how quickly employment circumstances can change, it can be a good idea to keep things quiet until you've actually settled in at your new job and you know for sure that it's a good fit. After all, you may end up finding some reasons to tough out your old job.