In the ending of Return of the Jedi, Darth Vader kills Emperor Palpatine to save Luke Skywalker, the Rebels destroy the second Death Star, and Luke sees the Force spirits of Obi-Wan Kenobi, Yoda and the redeemed Anakin Skywalker watching over his friends. The ending resolves two stories at the same moment: Luke's choice about his father, and the Rebel attack on the second Death Star. Vader dies after saving Luke, and Luke takes his body away and honors him with a funeral pyre. The Emperor dies with the Death Star, celebrations break out across the galaxy and on Endor, and the original trilogy closes with the Empire broken.
What does the ending actually mean? In my opinion, the key moment is not the explosion but the duel, where Luke refuses to kill Vader even when he is pushed to anger. The film wins its war by having its hero decline the usual victory, and Vader's turn on the Emperor only works because of that refusal. The battle around the Death Star and the ground fight on Endor keep the stakes physical while the throne room scene carries the argument.
The last image is a quiet one. Anakin appears among the spirits as himself and not as the masked figure, which tells the audience how the film wants Vader to be remembered.
How it compares with the other films in the series is part of the reading. The first Death Star belongs to Star Wars, the first film in release order, and the second is a deliberately repeated target here; I take that as a way of showing how far Luke has moved from the farm boy who first aimed at it. The Empire Strikes Back is the film released between them, and Return of the Jedi opens with Han still frozen in carbonite, so its first act has to clear that situation before the main story can move. In my opinion that is why the Jabba's palace sequence reads as a debt being paid. Finally, The Phantom Menace is the next film in release order but the first chronologically, with this film ninth in story order, so a viewer following chronology reaches Anakin's appearance among the spirits at the end of a much longer arc. If you want to see where the story goes next in release order, continue with The Phantom Menace.