As a customer service representative, you are the interface between the company -- your employer -- and the customer. Dealing with difficult people is an inevitable part of the role. Key to managing all kinds of difficult customers is keeping calm and not taking things personally. However, there are additional things you can do to defuse specific challenging situations.
No one ever much likes waiting for things, but sometimes it can't be helped. Impatient customers never seem to realise this, however, and act as if shouting louder or constantly asking when it's their turn will miraculously make you want to do things more quickly for them. The way to deal with this sort of customer is, first, to acknowledge their impatience and reason for it, but then to state, very clearly, the reason for the delay. For example, "Of course you want to get back on the road, Mr X, but our engineers deal with customers strictly in the order in which they come in."
If a customer comes to you with a complaint, it is natural to feel defensive, but the first thing to do is to find out, very politely, if the complaint is valid. This might involve asking them to show you the flaw in the product returned, or asking them how long they had to wait before being attended to. If you believe the complaint is valid, the only thing to do is to apologise on behalf of the company, offer some sort of recompense, such as an exchange or refund, and check that they are happy with what you have proposed.
Some customers appear to be difficult for the sake of it. They are argumentative, disagree with what you're doing and always think they know best. The way to deal with these people is to adopt the "stuck record" technique, in which you acknowledge what they are saying but then repeat the company policy. For example, "Yes, I understand that it is inconvenient for you, but the company policy is to close early on Thursdays."
The worst customers are those who think that, because you are in a service role, you should be treated like a servant. These are the people who click their fingers at waiters, don't look at you properly when talking to you, and issue orders rather than making requests. Much as it might make your blood boil, the only way to deal with this sort of treatment is to ignore it totally. Stay polite, do your job, but do not attempt to engage with this customer in any way.