Let me try to describe to you what the method means:
methods are designed to do things - you probably know that. Some methods take arguments or commonly known as parameters. Your method above takes in a primitive of type int (n). You might ask yourself where you will find the int variable to be passed into the method when called: It is easy, after you instantiate your class(the same class your method was created for), you will be able to call the addSum(int n) method by for instance saying myObject.addSum(4);
After you pass the argument to the method, the method will loop through (the number of times depend on the size of your int value passed). After that, each time a value of i is produced by the loop (for loop), it gets added to the sum - which was initialized to zero at first(during declaration). After int i is no longer less than n, the loop ends and the sum is shown.
There are other ways of calculating variables in java. Eg: "X *= Y" is same as X * Y then assign value to X
X/=Y is like division (x/y) then assign to X. X%=Y means getting the modulus (remainder) then assign to x. All of the work the same way. Just check out some tutorials and you will be fine. javabeginner.com is cool too.
I hope this helps.