Help on how to use the IRremote

I apologise because, it may be stupid a question, but, I have very litle knowledge of C++ and I do not know where I insert the remaining code? This sketch is has a lot of code that is not familiar to me.
I only know write the very basic code.

Thanks,
Manuel