The Dolphins in the movie and book are shown as one of the most intelligent species in the galaxy. Instead of using their intellect to take power, they have settled into a comfortable niche where humans dote on them and take care of them, occasional fishing accidents notwithstanding. When they learn that the Earth is going to be destroyed, they take measures to escape:
...most of their communications were misinterpreted as amusing attempts to punch footballs or whistle for tidbits, so they eventually gave up and left the Earth by their own means...
(Adams, The Hitchhiker's Guide to the Galaxy, Google Books)
The method the dolphins use to escape into outer space is never specified, but it can be assumed to be a technology beyond human comprehension. The film depicts them jumping directly into space; since this is impossible, it is either an exaggeration for dramatic effect, or the result of their advanced travel technology.
As part of the Fantasy Genre, the Hitchhicker's Guide to the Galaxy also explores the nature of the human condition. Like any government planning agency, the planning commission for the space super highway posts the plans for viewing and discussion in a central location. Unfortunately they forget to notify the planet about to be destroyed so the highway can be built (Earth). The dolphins in this story are actually visitors/aliens to this planet. They learn of this highway and planet destruction and leave before it happens.
Since the story is Fantasy, it isn't intended to be taken for real. Even while discussing issues found in the world today (the highway being built through a neighborhood--in this case Earth), it is still meant to entertain. As a viewer, whenever watching something on television, we need to keep this in mind. Not everything is meant to be real.
So, dolphins cannot actually jump that high or even fly.