As far as I can tell, the 2 Scanner objects have different purposes in this case. The first Scanner object reads your input from the console. Since the objective of the code is to capitalize the first letter of every word, you need to somehow break down your input into pieces and then capitalize the first letter of each piece. The second Scanner object is there so that you can take advantage of it's hasNext and next methods to achieve just that. Now you may ask why you can't use the first Scanner object to do this? Well if you take a closer look, the first Scanner object just reads the input and stores it as a String value (line 6). The first Scanner object does not store your input.
The condition in the while loop basically checks if there is another piece in the lineScan variable which contains your input broken down into pieces. In line 10, you go to the next piece of your input and store that value in the word variable. In line 11 there are a few things happening. You take the first character of your current piece and capitalize it and then concatenate the rest of the word to the capitalized character. Then you take capitalized piece and concatenate it to the upper case line variable.
The a += b is just a shorter way of doing the same as a = a +b