Alan Moore has said that Tales of the Black Freighter as a whole is an analogy of Adrian Veidt's story within Watchmen, but specific aspects of it are references to the other characters and their actions.
From an interview with Moore:
Q: There are some interesting microcosms in Watchmen, like "the Black Freighter". The protagonist asks "How had I reached this appalling position with love, only love as my guide?" whereas in the main story someone's committed genocide in order to save the world.
A: Yeah, there's even a bit where I think Adrian Veidt says at the end that he's been "Troubled by dreams lately, of swimming towards - " and then he says, "No, it doesn't matter, it's not important" and I mean it's pretty obvious that he's dreaming of swimming towards a great Black Freighter. Yeah, there's a parallel there. The pirate narrative was again something that emerged by accident - it emerged by accident in issue #3 - and yet originally it just grew out of a kind of incidental comment made by me and Dave. We were trying to work out the texture of the world and so we sort of said "Well, what sort of comics would they have? If they've got superheroes in real life, they probably wouldn't be at all interested in superhero comics" and I think Dave said "What about pirate comics?" and I said "Yeah, sounds good to me," so we dropped a few pirate comic titles into the background, including "Tales of the Black Freighter" because I'm a big Brecht fan.
Q: Yeah, they're all commenting on each other.
A: Yeah and I suddenly realized what a benefit it was having this pirate narrative embedded in the overall narrative I could refer to and use as a counterpoint. I mean yes, it eventually does end up being the story of Adrian Veidt but there's points during the pirate narrative [where] it relates to Rorschach and his capture; it relates to the self-marooning of Dr Manhattan on Mars; it can be used as a counterpoint to all these different parts of the story and after I'd done that it's kind of manifested in a lot of work since then.
According to Richard Reynold, the mariner is "forced by the urgency of his mission to shed one inhibition after another." Just like Adrian Veidt, he "hopes to stave off disaster by using the dead bodies of his former comrades as a means of reaching his goal".
From the Watchmen wikia:
The first part was read coinciding with the placement of a Fallout Shelter sign and the presence of a man who held a sign reading "The End is Nigh". It indulged in the heartbreak of the young mariner and his realization that this place where dead bodies were piled beside him was not Hell, and he was alive.
The second part is read to coincide with the Fallout Shelter sign that was similarly being placed on Doctor Manhattan's door during his decision to leave to Mars and its inclusion in the newspaper. The mariner recalls the disaster of the attack and thinks about his unsuspecting family, imagining their onslaught. He then buried his shipmates, and along with them hope of his family's survival.
Issue 24 continued on in Chapter V: Fearful Symmetry, coinciding with Bernard raving about the war's affect on everything. As the sun rose, the mariner decided to find a way back home and unburied his shipmates so he could use their gas-bloated bodies to support his raft. He left at night and ate gulls that flew near to him. He began to drink salt water in small amounts, then could see fins approaching. The sharks took away his shipmates' bodies and then he was attacked by a large shark that he stabbed in the eye. It eventually died, and provided him with food and support for his raft since it was entangled with its cords.
The next part of the issue was seen in Chapter VIII: Old Ghosts, surrounding Rorschach's escape from prison and the knot-tops decision to kill Hollis Mason. With thoughts of his dead family, the mariner in blunt terms, 'chose madness.' He decided to leap from his raft into the sea only to find he had arrived. He considered himself a spectre of revenge on the flow tide home.
The "Old Ghosts" could be seen as Mason (the first Nite Owl), or Rorschach and his dark past.
The next part is seen in Chapter X: Two Riders Were Approaching... surrounding Rorschach and Nite Owl's search to find out about Doctor Manhattan's disappearance. Two horse-back riders came by the shore and saw his body infest raft. The mariner killed them both and left for Davidstown upon their horses.
The "Two Riders" are quite obviously Rorschach and Nite Owl.
The last part of Issue 24 is found in Chapter XI: Look On My Works, Ye Mighty..., surrounding Adrian Veidt's ploy and the 'two riders' arrival in Antarctica to stop him. The mariner finds Davidstown and enters his once own home, that he now knew to be the home of the pirates. He attacked the first figure he could find and upon realizing it was his wife, he fled from the town and saw the Black Freighter out in the water. He swam towards the massive ship and reached for the rope, to climb to his destiny, now that he was marooned from his home, the world, his life.
Here, Rorschach and Veidt have both decided to eschew life. Rorschach chooses to die because he is stuck between a rock and a hard place: He can't bring himself to maintain the lie about what caused the disaster Veidt created, but he also knows that the lie and peace is a better option than the truth and a global nuclear war. Veidt has chosen exile, if not outright death, and remains marooned in Antarctica.
Some of the analogies are easier to see, as in this panel. The description by the narrator of The Black Freighter is overlaid with the fallout shelter sign, and the newspaper vendor's ranting about the impending war:
The black sails parallel the black triangle of the fallout shelter sign, the yellow skies are a metaphor for the yellow background of the sign, and the narrator's account of men's thoughts of war could almost be describing the newspaper vendor's words.
From a thesis titled Watchmen: As a Work of Literature, written by an Oregon State University undergrad student named Elizabeth Strobel, which is incredibly insightful:
One of the most interesting narrative devices in Watchmen is the frame narrative within the story, where a minor character is reading a pirate horror comic book that provides a parallel symbolism for the actions of several of the characters, such as Rorschach and Ozymandias. The story of “The Black Freighter” is juxtaposed against the current action, including the images from the comic book, creating a dialogue between the two texts.
The text of the comic is usually combined with the monologues of the newsvendor, and they both comment on and reply to each other. For example, the comic text “The waves about me were scarlet, foaming, horribly warm, yet still the freighter’s hideous crew called out, ‘More blood! More blood!”’ is placed with the newsvendor’s rant, “I’m a newsvendor, goddamnit! I’m informed on the situation! We oughtta nuke ‘em till they glow!” (Ch. 3 p. 1.3), which creates a connection between the newsvendor and the Black Freighter’s bloodthirsty crew through their desire for violence.
Both texts exist separately, that of the pirate comic and the newsvendor’s rant, but together they form a new dialogue that provides commentary on the events of the Watchmen world. This frame story adds to the tone of despair and horror that accompany the dread of nuclear war the minor characters in New York discuss. The opening of “Tales of the Black Freighter” plays appropriately against the image of the nuclear sign on a fallout shelter, as the narrator speaks of war, and describes the Black Freighter’s “black sails against the yellow Indies sky” (Ch. 3 p. 1.1), connecting the Black Freighter to the atomic bomb.
The story is read by a young black man named Bernard, who sits next to the man selling newspapers, and the text that he reads is shown in boxes that look like parchment, curling at the ends. The comments of the newspaper man are projected in speech bubbles, floating around the story the young man reads, so we read both the comments and the story, just as the young man reads the story and hears the comments.
One example of the interaction between the story of “Tales of the Black Freighter” and the commentary of the newsvendor is in Chapter 5, page 12.7. The narrator of “Tales of the Black Freighter” says, “This sudden confrontation with mortality induced an odd clarity within me,” and directly next to his statement is the newsvendor saying, “I mean, all this, it could all be gone: people, cars, T.V. shows, magazines...even the word ‘gone’ would be gone.” The “clarity” that the narrator of the comic discusses when facing death is also echoed by the newsman, and seems to be an extension of the narrator’s thought, even though both men are in very different situations, as one is alone floating on a raft made of dead men trying to prevent the destruction of his home, and the other is worrying about World War III.
In the last few frames of “Tales of the Black Freighter,” the audience is put in the position of the narrator, now actually seeing through his eyes, implying that they are now completely in his head, whereas before they were more objective observers. The narrator says, **“The world I'd tried to save was lost beyond recall. I was a horror: amongst horrors must I dwell.” This explanation of why he joins the crew of the Black Freighter reflects the Nietzsche quote from Chapter 61, “Battle not with monsters, lest ye become a monster.” The narrator of “Tales of the Black Freighter” has become a murderer just like the crew of the Black Freighter in his own deluded efforts to save his town from being destroyed by them.
The ending of this story is a commentary and an indictment of Adrian Veidt, and his actions in what he saw as saving the world. It also follows Rorschach's story, as he hurts people to help people, saying how when making an omelette, one must break a few eggs. However, this comes full circle for him, as he refuses to condone and live with Veidt's mass-murdering lie, proving that he cares more about individual humanity than Veidt, and he escapes from his role as a monster...
The warning of Nietzsche’s quote1 also comes back later, echoed in the ending of “Tales of the Black Freighter” in Chapter 11. At that point, the reader understands that the comic book story is a sort of allegory for the actions of Adrian Veidt, or Ozymandias, who has gone farther than Rorschach in his attempt to solve the world’s problems. Since Ozymandias has killed the Comedian and half of New York as a by-product of his plan to scare the U.S. and Russia into making peace, he has become like the evil of nuclear war that he fights, becoming a monster while fighting monstrosity.
Even Rorschach balks at Ozymandias’ methods, saying “Evil must be punished” (Ch. 12 p. 23.5), which shows that he still values life, and has not become the monster that he sees Veidt has become. The application of Nietzsche’s quote no longer fits Rorschach so well, and in the end fits Veidt entirely. When the reader reads “Battle not with monsters, lest ye become a monster” back in Chapter 6, the quote also foreshadows the end of the heroes, and the climax of the entire work. Moore does not do it on his own, but pulls in the tradition of nihilism by evoking Nietzsche, and adds another layer to his story.
1 The title of Chapter 6, The Abyss Gazes Also, is a reference to Nietzsche:
Battle not with monsters, lest ye become a monster, and if you gaze into the abyss, the abyss gazes also into you.
- Beyond Good and Evil: Prelude to a Philosophy of the Future, Aphorism 146
Or in the original German:
Wer mit Ungeheuern kämpft, mag zusehn, dass er nicht dabei zum Ungeheuer wird. Und wenn du lange in einen Abgrund blickst, blickt der Abgrund auch in dich.
- Jenseits von Gut und Böse: Vorspiel einer Philosophie der Zukunft, Aphorismus 146