They're commonly called acro crabs and most share a symbiotic relationship with their coral host. They can't live without a host.
If their legs are smooth like the pic shows, then just leave the crabs. But if their legs are hairy then they should be removed.