Like all journeys every game has to end somehow it can either be with a boss battle or a battle and with victory or defeat. Most game will have their boss with a higher amount of hit points and they may be able to call in minionsan example of this would be Legate Lanius form Fallout. One of the most recognizable bosses would have to be Bowser from Mario.
The ending for most shooter would be the protagonist killing the antagonist and the world is at peace or sometime still at war because you need to kill another enemy. RPG works sometimes the same but sometimes they will give the protagonist a choice on how the game will end. (Spoiler alert) Example of the first one is modern warfare series in the first one you defeat the Zakhaev, then General Shepherd, and then Makarov. An example for the RPG is in Mass Effect you can take to Saren and help him change him mind. The games that I think have the best ending would be Mass Effect, Red Dead Redemption, Fallout and Knights of the Old Republic.