The idea is quite simple. Offsetting the height map along the light direction and comparing it's value with the actual height determines which areas are shadowed. Scale and darkness/hardness of shadows can be controlled by adjusting the offset and contrast value.
The technique is not very expensive - adding an extra of 5-10 point light shader instructions (depending on the contrast value). It's possible to save some instructions by adding a constant clamp (0-1) before the contrast adjustment and by replacing the power node with a series of multiply nodes (e.g. 3x multiply by itself = power of eight).