Quick Question: Can I change the code? How?

How do I change the code in a ardupilot drone? I want to add some sensors and work with them.

Start here:

http://ardupilot.org/dev/index.html