A namespace is a declarative region that provides scope to the identifiers inside it. This feature is added in C++. It is not present in C. As we know in programming we can only represent one entity with one name. So we can not have two variables and functions with the same name. But if we use namespace we can use 2 or more variables and functions with the same name in different scopes.
Let's take an example:
So now let's come to the answer to the question. Basically, C++ has an std library that contains basic functionality that you use in building your application. These basic functionalities are defined under the std namespace. So using namespace std means that make all things under std namespace available without having a prefix to std:: before each of them.
Why this is considered bad practice?
This approach is okay for shortcodes but in the real world, it is not a good practice at all. Pulling out all the std namespace to the global namespace is not considered a good habit as it destroys the meaning of using namespace. Due to this practice name collision can be happened. This kind of situation is commonly known as namespace pollution.