Huck and Jim are headed to Cairo, "at the bottom of Illinois, where the Ohio River comes in" (15.1), where they can sell the raft and take a steamboat to Ohio–-one of the free states, where Jim won't be in danger of being sold back into slavery.
They figure it'll take about three more days to get there.
When a heavy fog rolls in, Huck goes ahead in the canoe and gets separated from Jim and the raft.
Jim whoops to Huck, but in the fog and confusion he still can't make his way back. So he panics for a bit and then just goes to sleep.
(Anyone else notice how many times people fall asleep during really important parts of the plot?)
The next day the fog has lifted and Huck finds Jim, who has also been sleeping. He lies down on the raft and wakes Jim, pretending that he's been there asleep the whole night and that the fog incident was all a dream.
Jim is all, "Argh, I had the strangest dream!" and Huck is all, "Really?"
So Jim narrates the story, only he "paint[s] it up considerable" with exaggerations (15.43).
Then he sees the leaves and smashed up oar on the raft, and realizes that in fact the incident was not a dream.
Huck is still in stitches, but Jim is genuinely hurt. He says he thought Huck had died in the fog and was just miserable over the whole thing. He sulks off.
Huck realizes his trick was a mean one. He works himself up to go apologize, which is hard because Jim is black. (Nice, Huck.)