When this limestone was forming, the snail and bivalve shells buried in it dissolved away, leaving gaps. The solid shell shapes you see are casts of the insides of these shells.
Portland, south Dorset