Ah the joys of people being given code without an explanation of what it does.
Any basic texts on C++ (even the really bad ones) will cover this stuff in the first few chapters. Just read them from the beginning.
:: is the scoping operator. So the name X::Y means something named Y within a namespace (literally a universe of names) named X. So std::getline refers to something named getline in the std namespace. The std namespace is reserved for use by compilers and libraries .... basically so, if a programmer needs to, something called getline can be created in another namespace without clashing.
The >> and << are operators. They have multiple meanings. For integer types, they are bitshift operators. When working with C++ I/O streams, which is how you're working with them, the syntax "some_output_stream << x" means that a variable s is written out to the specified output stream - << is called things like the "stream insertion operator". The syntax "some_input_stream >> x" means a value of x is extracted from the input stream, and >> is referred to as something like the "stream extraction operator".