All books need an antagonist or villain—they add tension and often are the cause of motivation to our protagonist. But often writers forget to give them as much depth as their protagonist. A villain who is bad just because he wants to be bad is a very boring bad guy. Think in terms of real life when considering antagonist. It’s all about perception, and you see it everywhere.
You might be liked by one person and hated by another. Maybe that person who hates you is justified in how they feel, but the wrong you did to them was out of a great need you can’t express at this time. You could feel torn about what you’ve done, but the secret of why this must be kept isn’t yours to share.
This is just one example, and I’m not saying every antagonist should be a misunderstood good guy either. Let’s face it—being cruel is a human condition. But even the meanest people have their reasons. As a writer you need to have those reasons fleshed out. Even if you never share them with your readers, it will help give authenticity and consistency to your antagonist as you write. Remember the best protagonist have a strong antagonist to face. Take the time to make that antagonist unforgettable.