What should be done with a person who calls a Muslim a dog, pig, or other offensive word? Is it a sin?
It is a sin and he should be punished (ta’zeer – punishment to be specified by the qadhu/Muslim judge). He also has to repent.
And Allah knows best.