Start with the custom code FAQ. It will give you an overview of the process and should explain a lot of things.
Then go back and read the rule machine instructions, and it should make a lot more sense.