This method of earning DKP is what's usually meant if DKP is used as a generic term.

Popular reasons to hand out DKP include:

On-time: at the starting time of the event, all members present receive a reward for punctuality
Replacement: If a raid member drops out, a readily available replacement receives a bonus
Duration: At the end of the raid, a reward is given for staying for the duration
Time spent: For each hour spent in the raid, a certain amount of DKP is handed out
Boss kill: Each boss killed yields a certain number of points, depending on boss difficulty
First kill: If a boss is killed for the very first time, an extra bonus is awarded to all participants
Points for tasks: Some systems expand "raid-related tasks" to include all activity that benefits the guild, like farming runs to acquire potions, runs for learning new encounters or donations to the guild item vault.