The poem "Inchcape Rock" by Robert Southey is based on a legend about a fourteenth-century Abbot who wanted to help keep mariners safe from the dangers of Inchcape Rock. Although the story of Sir Ralph the Rover may be legendary, Inchcape Rock, sometimes also known as Bell Rock, is an actual reef in the North Sea off County Angus on the east coast of Scotland, north of the Tay Estuary.
The "rock" itself is actually a reef, an outcropping of rock that is solidly attached to the ocean floor, and thus immobile.
The bell placed by the Abbot was attached to a buoy. A network of these navigational aids actually was established in the thirteenth and fourteenth centuries, as a less expensive way to supplement lighthouses. Buoys are floating markers tethered to stationary objects or anchored to the sea floor so they would remain in fixed spots in the water.
The bell as described in the poem would have been placed on top of a buoy and the buoy itself firmly attached to the reef so that it would not move relative to the reef, but just bob in place in the waves, a small motion that would cause the clapper to move with respect to the rest of the bell, causing it to ring.