The shifts in narrative are because this is a story within a story, sometimes called a "frame" story because the primary story "frames" the secondary story.
As Heart of Darkness begins, Marlow is sitting on a boat called a "yawl," clearly a sailboat since he refers to the sails. The narrator describes to the reader the men around him, the "Director of Companies, who is the captain, and "four others," who include Marlow and the narrator himself. Then Marlow speaks:
And this also," said Marlow suddenly, "has been one of the dark places of the earth (67).
At this point, the narrator is telling the reader what Marlow says. Then the narrator takes over again, telling us about the men's responses. When Marlow speaks next, the narrator is still telling the story.
Finally, Marlow begins the story within the story on page 70. Now we have the narrator telling the reader what Marlow is telling the men. I believe it is not until page 95 that Marlow stops his tale and the narrator pulls us back to the setting around Marlow, when the narrator says, "He was silent for a while." It is Marlow he is describing. Marlow resumes his story again and has "the last word" on page 99, when the story ends. (I have provided page citations to an on-line version of the story, and the link for that version is below.)
What effect do you think it has on the reader to hear Marlow's story "filtered" through the narrator? Do you think the narrator is reliable? Remember, no one had a tape recorder in those days!