G++ is a command for compiling C++ code. It is very similar to GCC, a C compiler. g++ automatically includes the C++ libs, so
g++ hello.cpp
is about equivalent to
gcc -lstdc++ hello.cpp