Accessors are methods. Their role are to return the values of an object's state (a field in Java, a property in Javascript…)
For the same field, you can have several getter:
If the creation of object is expensive, you can also have a cache of objects and return the cache instead.
The Get method is the accessor while the Set method is known as the mutator method.