in command mode. Semicolon(:) indicates a command, 1,$ indicates a range that following command will work. In that case from 1st line to the last line. d means delete the specified lines.
Another command for the same purpose is:
gg takes you to first line and d means delete again and G means to the last line.
And one more command is: