An iterator is a object that permits access to objects inside a container. Although each container class has its own operators and methods to access the contained objects, iterators are useful in many situations.
Although each iterator class is associated with a particular template class, iterators are also classified into a few main categories based on what they can do. This permits iterators associated with different template classes be applied to constructs that only rely on certain capabilities of iterators.
In other words, iterators introduce an isolation between container class templates and methods that only rely on certain methods to access items in containers.