You can use system("pause") for small programs. It is bad practice to use this, but for testing purposes you can use it. I have heard that cin.get() works, but it never has for me.
Because it is asking the operating system to do something for you. You have no idea what it will do, and no control over that. If you're lucky, the operating system understands the command AND it does what you expect. If you're unlucky, it does something else entirely. If you try it on my PC, it kills the process entirely because that's what I set the pause command to do (which I had to create myself, as the shell I use doesn't have such a command). I could easily change it so that it, for example, deletes the programme or formats the hard drive or eMails your logon details to me.