cin.get() extracts a single character from the stream. In this case you already have a \n character in the stream from when you pressed Enter after your input, so your cin.get() will read that and the program will close. By adding a second cin.get(), you are assuring that the previous \n character was read and that the user will have to press Enter again. As for cin.ignore(), it will simply ignore the current \n character left in the stream and force the user to press Enter to continue.
It should be said that you won't always need to have two cin.get() statements. If there isn't a \n character hanging out in the stream from the user hitting Enter previously, then one cin.get() will suffice.