The ending of Star Wars: A New Hope settles the Death Star threat and leaves the war open. Luke turns off his targeting computer, trusts the Force and lands his torpedoes in the station's one weak point, the exhaust port, and the Death Star is wiped out. Han Solo comes back at the key moment and sends Vader's fighter spinning away, which is why Vader survives rather than dying with the station.
In the story, Han's return is the one change of heart the plot needs. He was hired as a smuggler to fly passengers off Tatooine, and he arrives back at the last moment to take the risk while Luke takes the shot. That split is why the medal ceremony honors both of them.
A production detail adds context. The official Star Wars site reports that Lucas decided during the Tunisia shoot that Obi-Wan Kenobi would die before the end of the film, and that choice gives Luke's final run, guided by Obi-Wan's voice, its weight. In my opinion, the sequence works because it pays off three earlier scenes: Obi-Wan telling Luke about the Force on Tatooine, Obi-Wan letting Vader strike him down during the duel so the others can escape, and the destruction of Alderaan, which shows what the station can do before anyone attacks it.
How does the ending compare with the rest of the series? Vader's escape is the open thread, and The Empire Strikes Back, second in release order, is where the war continues. Return of the Jedi, third in release order, completes the original run of three. This film is the only one of the three that closes on a ceremony, with Leia honoring Luke and Han, rather than on the war still in motion. Rogue One sits sixth in story order, directly before this film, so a viewer going in chronological order arrives at the medal ceremony right after it. Watching in release order instead, the ceremony is the first resolution the series offers, which is a different experience from reading it as the seventh chapter.
One more point of context from the BFI's Sight and Sound: all nine stages at Elstree Studios were occupied by sets, while the Tunisia shoot lasted about two and a half weeks. The desert scenes and the studio interiors were made in very different conditions, and the ending's tight, cut-together action belongs to the studio side of that split.
Can the film be watched alone? Star Wars: A New Hope can be watched alone, but Vader's escape leaves the war open for The Empire Strikes Back. The next film in release order is The Empire Strikes Back, and for where this film sits against the rest, see the Star Wars timeline.