Here's a generic p element. It will be red.

Here's a group-class p element. There are two rules that apply, but since the rule is more specific, this paragraph will be blue.

Here's a p element with an id of one. There are four rules that could apply to this paragraph. The first two are overruled by the more specific last two. The position breaks the tie between the last two: the one that appears later wins, and thus this paragraph will be magenta.