the compiler looks at the definition of instance std::cout and to determine its type. It then looks at that object to see if it has a member function operator<<(constchar*) and uses it.
So that code, runs the function call:
std::cout.operator<<("Hello world");
The symbol operator<< is just the name of a function, but matches << in your code.
Why bother with all that when you could already write to stdout with printf("%s", "Hello world")? You can't create custom format specifiers for your special new class that printf will recognise, so a new system was required that worked with built in types, intlongdouble and so on, and also works with any type that someone would create in the future. It is was made generic enough to work with any stream (serial i/o thing).