Accessor methods access the state of an object by returning either the value of an instance variable or a value derived from the value of an instance variable (such as a formatted date). They typically are named getWhatever(). Mutator methods change the state of an object by assigning values to instance variables. They are typically named setWhatever(). Be careful, however, the notion of declaring public accessor and mutator methods for all of the instance variables in a class was one of the early misconceptions about how to declare a class in object-oriented prpgramming languages. Classes should implement behaviour and automatically declaring accessor and mutator methods for all of the instance variables in a class effectively breaks encapsulation.
Methods that appear to be mutator methods but in fact return a new instance of an immutable class are what I call the Would-Be Mutator design
pattern, which is a proven programming technic for the design of immutable classes. IT SHOULD NOT BE CONFUSED WITH MAKING DEFENSIVE COPIES, however. No less than Joshua Bloch does this in Effective Java. Making defensive copies is a programming technic that is absolutely necessary in order to encapsulate references to mutable objects. These are two very different motivations.