In the original trilogy (episodes IV to VI), Darth Vader was the villain. He was the enforcer of the Emperor's tyranny throughout the Galaxy. He hunted down the rebellion, tried to destroy it. He tried to turn Luke to the Dark Side. He eventually destroyed the Emperor, and this led to his own death.
The new trilogy added a new depth to the Star Wars saga. It introduced Anakin Skywalker as more than a villain. He was transformed from Star Wars' main villain to its tragic hero.
A tragic hero is the main character of a story whose mistake(s) lead him to his own downfall. Shakespeare is probably the most famous at writing about tragic heroes, but tragic heroes both preceded and followed him.
One character, and only one, appears in every single Star Wars film- Anakin Skywalker. In the first movie (The Phantom Menace), he is a boy slave on Tatooine, who is rescued by the Jedi. He has big dreams that may seem impossible, but to him are his future. Qui-Gon Jinn wants to train him as a Jedi, but the council is hesitant. They say he is too old. On Naboo, Qui-Gon Jinn is killed, and makes his aprentice, Obiwan Kenobi, promise him that the boy will be trained. In the end, The Jedi Council decides to allow Obiwan to train him.
In the second movie (Attack of the Clones), Anakin is ten years older and the aprentice of Obiwan Kenobi. He has been befriended by Supreme Chancellor Palpatine, and has began to resent Obiwan and the Jedi Council because they seem to mistrust him. At the advice of Palpatine, the Jedi Council gives him his first solo assignment- return to Naboo with Senator Padme Amidala and protect her. On Naboo, Padme and Anakin fall in love. Anakin has dreams about his mother, and he and Padme return to Tatooine to rescue her. On Tatooine, he finds her in a camp of Tusken Raiders, where she dies inhis arms. In rage, he destroys the entire camp, men, women and children. Next, they rush to Geonosis to save Obiwan, who has been captured by the Seperatist droid army. All three end up getting captured, but Yoda saves them in the nick of time with the Republics new clone army. On Naboo again, Anakin secretly marries Padme (the Jedi are forbidden to marry).
In the third movie (Revenge of the Sith), Anakin and Obiwan return from the Rim Territories to rescue Palpatine from an invasionary force of Seperatists. In the battle, Obiwan is knocked unconcious by Count Dooku, and Anakin duels with him. He unarms him and, at the advice of Palpatine, kills him, going against the Jedi prohibition of killing unarmed prisoners. Anakin returns to his wife Padme, and she reveals to him that she is pregnant. He begins to have dreams of her dying in childbirth, and he begins to seek out a way to save her. Palpatine makes him his representative to the Jedi Council, and they ask him to spy on Palpatine. This angers Anakin, and further makes him distrust the council. Palpatine offers Anakin the chance of learning the Dark Side of the Force, which Palpatine claims will allow him to prevent death. Anakin discovers that Palpatine is the Sith Lord who has been leading the Seperatists and informs Mace-Windu. Mace Windu goes off to confront Palpatine while telling Anakin to remain. Anakin breaks into the Supreme Chancellor's office in time to see Mace Windu and Palpatine fighting. Windu is about to kill Palpatine, and Anakin pleads Windu not to. Windu says he's too dangerous to keep alive, and Anakin kills Windu to save Palpatine. He then pledges allegiance to Palpatine and the Dark Side of the Force, thus cementing his conversion to evil. Throughout the rest of the saga he performs great attrocities on behalf of the Emperor until his redemption right before his death (another quality of the tragic hero).
At the end of the last movie (Episode VI: Return of the Jedi), Anakin kills the Emperor to save his son, Luke Skywalker, which causes a chain reaction to destroy the Second Death Star. Luke drags him out of the Second Death Star, but it is too late, he is dying. Luke gives him a hero's funeral and cremates him at the end of the movie.