Basically, rep is another kind of like, less often given. If the person wishes to add a reason, he may do so, but it is not required.
Some kind of score is kept by the computer. But I think the exact formula relating comments, rep points and rep power is kept in a locked safe and guarded 24 hours a day. You are like the 20th person who has asked in the almost one year I have been at CC.