nextInt() returns an integer from the input. hasNextInt() returns true/false for whether the next input is an legal integer or not. It would return false if you typed a string, character or integer beyond the MAX_VALUE for integers.
input.hasNextInt(); is useful for while loops as it allows you to check if the file you are reading has another int which keeps the while loop running. input.nextInt() on the other hand actually reads the next integer in the file.