Help understanding this code!

It is unreasonable to expect forum members to go through and explain the code line by line, so ask a couple of questions about the parts that confuse you the most.