If you're just looking to pause the script until a key is pressed, then getch works, but if you want the character they pressed NOT to appear on screen (or you don't care about which key they pressed) you can use
system("pause > NUL");
It calls the Windows "pause" command and routes the displayed text and input (normally it says "Press any key to continue...") into an empty abyss.
The alternative is use a function like GetAsyncKeyState() and looping through all the input codes to see if any key is currently being pressed. This method works much better if you're trying to run a processing loop and want to break out when a user presses a specific key (for example, Escape). Using it to see if the user is pressing any key at all would involve wasting a good bit of processing power.