It is normally made from hard rock, commonly granite or concrete rubble recycled from construction sites, and is used to protect coastlines from erosion and other coastal processes caused by the sea. It is also used inland on lakes, rivers, and other waterways to protect the banks from erosion.
It normally works by absorbing the impact of a wave before the wave reaches the cliff or sea defence, and so minimises the erosion caused by the wave.
It is frequently used to protect the base of old Edwardian/Victorian sea walls, which due to the vertical wall, are often undermined. The riprap absorbs the impact of the waves if they shoot up the wall, and then fall back down.