Comments are portions of code that are just ignored by the compiler. They have no effect on the program in any way. The purpose of comments is to make the program more readable to people. The simple fact is that programs tend to last a long time, sometimes several decades. Comments make programs easier to understand and maintain.
Comments are used for several purposes: identify the author, purpose, creation date, etc., of a program. Comments should be used to describe any aspect of the program that is not obvious.
C++ has two styles of comments, one inherited from the C language and another that is new to C++. See the two exhibits for information.
Links:
C style comments
C++ style comments
Executable and non-executable statements
Basics of C++