There are two answers, and both are used.
The specific one is by species — Sonic is a hedgehog, Tails a fox, Knuckles an echidna, and so on.
The broader term is Mobian, since the cast inhabits the planet Mobius in Western continuity. So "Mobians" works as the collective noun when you want to describe them as a group rather than one at a time.