Occasionally hermit crabs will lose a leg or claw, and while it isn't a death sentence, it is a sign that you need to carefully evaluate your crab care techniques and tank conditions. Dropping a leg is a natural defense for a crab - they do this to escape if something (e.g. another crab) has a hold on one of their legs, or if a leg gets injured. It is also thought to happen with illness and stress. It sometimes happens when a new crab comes home from the store, since the whole collection/transport/pet store experience is pretty stressful. Anyway, there are a number of things you need to evaluate if your crab loses a leg (or legs -- the loss of multiple legs is more serious). And don't despair - a healthy crab living in good conditions will be able to regenerate a lost leg or claw. "My Hermit Crab is Losing Legs - What Should I Do?" covers a checklist of things to do and what to expect in more detail.
More on Hermit Crabs