How does compareTo() works : I read some answers regarding compareTo() function but still not clear about how it works internally. 

I have below code snippet which I am trying to understand.

    public class Employee implements Comparable<Employee> {
	
        private int id;
	    private String name;
	    private int age;
	    private long salary;

	    public int getId() {
	        return id;
	    }

	    public String getName() {
	        return name;
	    }

	    public int getAge() {
	        return age;
	    }

	    public long getSalary() {
	        return salary;
	    }

	    public Employee(int id, String name, int age, int salary) {
	        this.id = id;
	        this.name = name;
	        this.age = age;
	        this.salary = salary;
	    }
	    
	    @Override
	    public int compareTo(Employee emp) {
	        //let's sort the employee based on id in ascending order
	        //returns a negative integer, zero, or a positive integer as this employee id
	        //is less than, equal to, or greater than the specified object.
	        return (this.id - emp.id);
	    }
      }

And one CompareClass as:

    public class CompareClass {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		Employee[] empArr = new Employee[4];
		empArr[0] = new Employee(10, "Mikey", 25, 10000);
		empArr[1] = new Employee(20, "Arun", 29, 20000);
		empArr[2] = new Employee(5, "Lisa", 35, 5000);
		empArr[3] = new Employee(1, "Pankaj", 32, 50000);
		
		//sorting employees array using Comparable interface implementation
		Arrays.sort(empArr);
		System.out.println("Default Sorting of Employees list:\n"+Arrays.toString(empArr));

	}

    }

So when Arrays.sort(empArr) is called then inside compareTo() which is the this.id and which is emp.id. Basically I am trying to understand , when compareTo() is called then employee object from empArr becomes the current object and then with which object it is getting compared.

 return (this.id - emp.id);

so what is "this" and  "emp" ?