Inside a method, this refers to the current object. The one that the method was called on. Most of the time you don't need it, but it becomes necessary when a parameter name matches a field name:
class Car {
String color;
void setColor(String color) {
this.color = color;
}
}
Without this, writing color = color; just assigns the parameter to itself. The field never changes. With this.color, you tell Java: assign the parameter color to the field color on this object.
Whenever a local variable shadows a field, use this to resolve the ambiguity.