Essentially, the results of a player's in-game choices are used to populate a post-game comic book-style story -- progress, character info, settings, dialogue, achievements and screenshots are all pumped into an algorithm alongside the results of said variables, metrics from your playthrough, and your performance therein.
Inspired by the "Infinite Crisis" comic books, this game's original story has the barriers between the different dimensions of the DC Multiverse being torn apart.