Surf crabbing is possible but can be very difficult, as it depends on the location and type of crab. For the most part, you will have more success if you are on the west coast such as Oregon than on the east coast such as Maryland.
Dungeness crabs are larger and tend to be able to handle the tide a bit better. Blue crabs are lighter and tend to prefer the bay. In order to catch crabs in the surf, you are going to have to be fairly lucky with timing, get the right water conditions, and also have the right type of gear.
First, it will be too difficult to try and catch crabs by hand, since you will not be able to see very well and without bait, crabs will often flee. It is possible however but quite difficult.
If the waters are not too rough, you can try using a crab snare to cast out into the ocean water. Slowly let the snare take its place, and begin to drag it in as if you are fishing.
With enough luck, you will have lured over some crabs that are attracted to the right kind of bait.
Slowly pull in the snare and with some luck, you might find that you have dungeness crab on the line!