The more distractions you have in your narrative, the fresher the plot/character twist. They were used in ‘The Da Vinci Code’ and the Harry Potter series, to keep the audiences focussed on a different ‘conclusion’. How are they done, exactly?
Stories run on anticipation. A reader keeps reading because the anticipate that certain things are going to happen, and that we are making progress towards those things happening. By and large, the reader reads on because they anticipate the enjoyment of watching those thing happen, and thus enjoy the anticipation itself. When the reader finds a story boring it is because they don't anticipate anything happening that is likely to interest them.
Good writing, therefore, is about creating and maintaining that sense of anticipation and then following through and delivering what was anticipated.
A red herring creates a false anticipation. It suggests that A is going to happen, but B happens instead. There is no special technique for creating red herrings. You simply tell the story as if it were leading up to A happening. But then you twist the story and have B happen instead.
The perils of red herrings should be obvious. If the reader is anticipating A, and their pleasure in reading depends on the anticipation that A will happen, then the sudden discovery that A is not going to happen can come as a great disappointment and can lead them to stop reading and give the book a one star review on Amazon.
For the red herring (which is to say, the plot twist) to work, the reader who was expecting A has to be delighted to find that B happens instead. If you lead them to anticipate hamburger and then serve them steak, you will have some happy readers. If you lead them to anticipate steak and then serve them tofu, you will have some very unhappy readers.
Surprising, yet inevitable
The perfect plot twist should be one that the readers do not expect, but makes them feel that the plot makes more sense happening this way than if it happened any other way. A good example is the scene at Mt. Doom in Lord of the Rings.
(I realize it's Lord of the Rings, but I'm spoilering it anyways)
Nobody expects the heroes to overcome all of their trials and tribulations only to have their willpower fail at the last critical moment. But considering how worn down Frodo is and how powerful the Ring has become, it makes perfect sense for him to succumb at that moment.
And Gollum's intervention wraps up the theme from the very beginning of the series about whether or not Bilbo's mercy in not killing Gollum was the right choice or not, and gives a satisfying conclusion to Gollum's character arc.
For red herrings, this has two parts. It means that what actually happens must make more sense than what the readers expected would happen. And the clues that misled the readers must have a satisfying explanation for their presence.
For example, in the first Harry Potter novel
The reveal that Quirrel is the villain explains a number of details - his presence at the Leaky Cauldron, his discovery of the troll on Halloween, and his abrupt personality shift after his trip to Albania.
Additionally, the clues regarding Snape's intentions are explained by his attempts to head off Quirrel's plan, and his genuine dislike of Harry.
The trick is to hold back some of the necessary information without letting the readers know that there is a gap in the readers' knowledge, while at the same time dropping clues to what's actually going on without drawing any attention to the significance of those clues.
No twist will surprise everyone
Because a proper twist needs to be an entwined part of the story, no twist is going to surprise everyone. That's okay. The satisfaction of being able to correctly predict an unexpected event is generally just as fulfilling as the surprise of not predicting it.
Don't let the twist itself make or break your story. It's the consequences of the twist that are important rather than the surprise itself.
To use the first Harry Potter as an example again
The twist itself was that it was Quirrel, rather than Snape, who was evil. The consequences were that Voldemort was present right there on the back of Quirrel's head, and that Snape was not a generically evil minion but a significantly deeper and more complex character.