That can't be answered in short here. You need the data sheets of your micro controller and the I2C devices. Many device manufactureres (like Microchip for your controller) have additional application notes about using the I2C bus with their devices. You should also read the
The I2C-Bus Specification and User Manual[
^ PDF]. Another good online resource is
http://www.i2c-bus.org/i2c-bus/[
^].
If you have a specific problem with some code you may ask this here. But you probably get better help in the Microchip forums.