What exactly is a namespace?
It's kind of like specifying what dictionary you're using, in this case standard. Then when your compiler reads your code and translates it into binary it uses the same dictionary.
namespaces contain pre-defined objects of some class or classes. therefore, cin and cout are pre-defined objects of iostream class which are members of "std" namespace.