"Remember that, by default, cp copies the first directory into the second directory if the second exists.
For example cp -r a b will copy the directory a into b. If b does not exist, it will be created with the contents of a.
If you want to copy the content of a into b (for example when copying a whole filesystem into a mount point) use:
cp -r a/. b
as in the previous answer.
Please also note that -a, used in some of the other answers, is the same as -dr --preserve=all and will preserve timestamps, context and extended attributes."