First of all, you should re-consider your decision of quitting your job. Note down all the factors that have pushed you towards this. Include every disapproving aspect including the bad behaviour of your boss or other employees and the internal politics.
Then you should write down all those disapproving things that you can endure while working in your current organisation. It will help you in taking the decision whether you should quit the organisation or not.
You need to try your best to resolve all issues at your current job. Resolving conflicts is the best option to help you stick to your current job. However, if you fail to resolve things and they continue growing then plan to quit the organisation.
You should discuss all things with your supervisor or manager who will help you in sorting out things appropriately. However, if you always feel bad about the workplace then it is better to quit.
Before quitting your current job, you need to apply to all job vacancies that are advertised in newspapers, magazines or websites.
You should control your frustration while working in tough conditions in your current organisation. It will help you in thinking of different ways to quit the company.
The best time to quit your current organisation is when you find a better opportunity. If you get a better job offer, immediately take action and quit from your existing job.
Make sure you obey the rules and regulations of resignation and the notice period. Leave your current organisation in a professional and dignified manner. Also, meet to all of your colleagues before leaving the office.