A namespace behaves like a dictionary table where lexically sorted items can be stored. There may be several namespaces. Each namespace is distinct from any other and so a particular value may be present in more than one namespace and may mean a different thing in each.
For example, the collection of properties belonging to an object class is referenced via a namespace. Each class maintains a separate namespace and so a property with a particular name can be added to several objects without any collisions.
The namespace where variable names and functions belong is also the same namespace where reserved words and keywords are accessed. Or at least this is the conceptual idea, when the standard recommends that you should not name your identifiers with the same value as a reserved word.
A namespace could be conceived as a particular directory within a file system or a set of object ID names within a document model. All of these operate with typical namespace behaviors regarding collisions between dissimilar objects having the same name.
Namespace pollution can be alleviated by prefixing the names of certain kinds of objects. You might have two functions that create named items in a namespace and to ensure they do not operate on each other's entities, they could each add a different prefixing letter to the entity names.
Style sheets use namespaces as well to indicate different functionality during the cascading process.