The trick is that C-commanding effectively goes up one level first, and then checks dominance. In other words, a node C-commands everything dominated by its parent, and not by itself.
Take this (very simplified) tree as an example.
Clearly, NP1 "Alex" is not NP2 "himself", and NP1 "Alex" does not dominate NP2 "himself", or vice versa. But every node that dominates NP1 "Alex" (namely, the S) also dominates NP2 "himself". Therefore, NP1 "Alex" C-commands NP2 "himself".
This is important, because it seems to be how reflexives work in English: the NP "Alex" C-commands the NP "him", which makes it change from "him" to "himself". But if "Alex" is buried any deeper in the tree, as in "the man who works with Alex saw him", then "Alex" no longer C-commands "him", and so no reflexive happens.