In the ending of Die Another Day, Bond kills Gustav Graves in the plane engine, Jinx kills the traitor Miranda Frost in a sword duel, and Icarus is disabled before North Korea can use it to invade South Korea.
The person who betrayed Bond is Miranda Frost, Graves's assistant and the traitor inside MI6. Her death answers the doubt M carried after the prisoner swap with Zao, when she suspended Bond's 00 status because she feared he had talked during 14 months of torture. Zao is already dead by then: Bond dropped the ice chandelier on him at Graves's ice palace in Iceland.
Graves's true identity ties the finale back to the opening. He is Colonel Moon, the officer whose arms-for-conflict-diamonds deal Bond was investigating when his cover was blown at the North Korean base. He used gene therapy to take a new identity, which is why Bond chases Zao to a gene therapy clinic in Havana and finds Graves's emblem on the pendant Zao leaves behind. The same logic explains the one killing Graves commits on screen against his own side: General Moon objects to the plan to clear a path through the Korean Demilitarized Zone with Icarus, and Graves kills him.
My read is that the most interesting choice is how the film stages the last fight as a set of mechanical steps. The armored suit gives Graves a physical advantage, Bond turns that suit into a hook, and the engine finishes the job. To me it plays more like an engineering problem than a punch up, which suits a film built around gadgets and an orbital mirror. Compared with the earlier Brosnan films, it trades a single hand-to-hand showdown for a duel split across two pairs: Jinx against Frost with swords, Bond against Graves with the suit and the engine.
The production history adds context. The satellite climax was first set in Manhattan and was moved to Korea after the September 11 attacks, which is how a story about a rogue colonel and the Korean Demilitarized Zone ended up carrying the finale. In my opinion the film also reads as a celebration of the 20th entry: Q's warehouse is stocked with gadgets from earlier Bond films, and Q calls Bond's watch "your 20th".
Bond and Jinx then leave the crashing plane by helicopter with the diamonds and spend a romantic evening in a hut at a Buddhist temple. The film sets up nothing beyond Bond's return to service, and the next film, Casino Royale (2006), restarts the series.