The map method is used to convert a stream of one object to a different object. For example you can convert a stream of some object to stream of String by calling toString on the objects of the steam like this (there are other syntaxes of doing this, I'm just using one of them):
I would just point out that you don't have to return different type of object, you are free to return the same type of object, even exactly same one without any internal modification to given object. See description directly from method javadoc:
Returns a stream consisting of the results of applying the given function to the elements of this stream.
You also have map method on primitive streams, which return the same primitive (optionally with som modification), eg: