At the end of the original radio series, the Earth has been destroyed to make way for a hyperspace bypass. Arthur Dent, the only surviving human, is left stranded in the Milky Way with his friend Ford Prefect, an alien researcher. The story ends with Arthur and Ford aboard a Vogon ship, having just escaped the Earth's destruction, and Ford telling Arthur that the ship is about to be attacked by a hostile race of aliens called the Krikkit.
In the book series, the ending is a bit more ambiguous. Arthur Dent and Ford Prefect are still on the run, and the story doesn't end with a definitive conclusion. However, there are hints that the universe is about to be reborn, and Arthur and Ford are somehow involved in the process.
In the movie adaptation, the ending is slightly different. Arthur and Ford end up on a planet called "The Restaurant at the End of the Universe," where they meet a variety of interesting characters. The film ends with Arthur and Ford reflecting on the absurdity of the universe and the meaning of life, without a clear resolution.
Therefore, the "end" of *The Hitchhiker's Guide to the Galaxy* depends on which version of the story you're referring to. But in all cases, it's a humorous and thought-provoking exploration of life, the universe, and everything.