You can do a simulation by hand, e.g. try to calculate sumFibs(10) or so. Look at the while-loop and watch how currNumber and prevNumber change.
Only looking at the program lines and try to understand them is sometimes not enough, you have to see how the algorithm works (so the idea is doing a simulation).
The Fibonacci sequence is as follows: 0, 1, 1, 2, 3, 5, 8
In the first run prev is zero.
In the first run, curNumber is 1. So we have: 0, 1
The next value of currNumber is the sum of currNumber, which is 1, and its previous value, prev, is zero. I kept the sum in a tmp variable.
Why did I keep it in the tmp variable?
Because the value of prev in each loop is equal to currNumer, it means that prev will be one block ahead. Finally, the currNumber value is updated for the next loop.