I think the best way to learn new things is by doing. Start with a simpler application - flashing an LED is the usual "Hello, World!" program for microcontrollers. Once you get that going, you will have a much clearer understanding, and you'll be ready to move on to something more complicated...