basics of wire library

the link below shows a sample code for a digital accelerometer
http://www.fut-electronics.com/wp-content/plugins/fe_downloads/Uploads/3Axis-digital-accelerometer-with-Arduino.pdf

Can anyone help me decipher the code a little, how the wire library works and stuff.

Can anyone help me decipher the code a little

Sure. What part(s) of it don't you understand?

how the wire library works

The beauty of using a library is that you don't have to know how it works. If you want to understand that, read the code.

and stuff.

Nope. Can't help you with that.