While in normal mode, type:
Here's a breakdown of this command.
|:g||This will execute a command globally on all lines that match a regex (to follow).|
|/^$/||This is the regex. The forward slashes enclose the pattern, which is: |
|d||This is the command to be executed. |
So when you put it all together, you find all blank lines globally across the whole file, and delete them.