There are a number of ways to deal with a difficult boss. Every work situation is unique and is formed by the management practices, business models, and variety of personalities involved in the workplace. Although every situation is different, there are a few key things that you can do to try to improve your working relationship with your superior.
The first thing to do when trying to deal with a difficult boss is to first take a good, hard look at your own work. Make sure that the work that you are doing and the ways in which you are interacting with your superiors and your co-workers is as good as possible. If you have a trusted colleague, you may even want to ask for advice on how you can improve. Be sure to be prepared for criticism, but only ask someone who you know will offer constructive criticism. You may find a way to improve some aspect of your performance as a worker and neutralize an issue with your boss.
One way to ensure that you are doing exactly what you should be doing is to read through any employee handbooks that apply to your work. Make sure that you are in compliance with the regulations and expectations in the handbooks. You may also want to read up on workplace etiquette to make sure that you aren't doing something, without even knowing it, to irk your boss.
Unfortunately, you may find that nothing that you do to improve your work or adhere to company expectations and policies will improve your relationship or interactions with your difficult boss. The sad truth is that there are some people in management who are just hard to deal with. When dealing with such a difficult boss, one of the most important things to do is to stay calm during all of your interactions.
Take deep breaths and remain professional. When your boss gives you directions, be sure to repeat them back to ensure that you understand what is being asked of you. This will point out to your boss that you are paying attention and will also give you a conversation to reference if he or she implies later on that your work was unsatisfactory. Finally, if you are still having trouble with your difficult boss, seek out the assistance of human resources or gather together a number of others in your workplace who are having the same problems and discuss your concerns with your boss in a frank but non-confrontational manner.