Imagine someone numbs their hand with an injected anesthetic.
Then later he decides he is not the hand and is not identified with it.
He beats the hand with a stick.
He does not feel anything, but lets assume the hand still flinches.
He finds this fun, and beats the hand again and again
He enjoys watching the hand struggle every time, but feels no pain.
Later he beats himself on his leg, which is not numb and normal.
He feels pain.
Then he extrapolates that the hand must technically be feeling a similar pain as when he hit his leg.
This is cognitive empathy.
When the anesthetic wears off, now when he beats his hand, he feels pain.
He understands the hand is himself and treats it just like he treats his leg.
This is experiential empathy.