All crabs lay eggs but many female crabs have this flap on the underside back part of their body, this will open out a bit and the eggs stay attached to it, that way they can defend their eggs from predators, when the eggs hatch it can look like they are giving live birth but they are not. (Lobsters and Crayfish are the same only the eggs stay attached to the underside of the tail) There are some land dwelling crabs like those on Christmas Island that lay their eggs in the sea and leave them to return to their forest homes.
Crabs do not give live birth but instead, they lay eggs. Crabs are recognized to work mutually to offer food and protection for their family and during mating season to get a comfortable spot for the female to release her eggs. Read more on http://en.wikipedia.org/wiki/Crab.