strcpy doesn't know about the length of the destination array so it will overwrite whatever is stored after the array in memory. This could lead to the program crashing or in other ways not functioning correctly.
In your second program cin>> will read the first word and cin.getline will read the rest of the line. Note that getline overwrites the content of the string so the first word you input will be lost. If you input "Anna Bannana" only " Bannana" will be outputted. If you input only "Anna" then nothing will be outputted.
It's not possible for strcpy to know the size of the array because what is being passed to the function is in fact a pointer to the first char in the array. strcpy just assumes the array is big enough.
You have the same problem with cin>> and cin.getline in your second program. If you enter a word that is longer than 9 characters you are in trouble. That's why it's much safer to use std::string. If you use C strings you need to be very careful.