To find out which is the harder of two rocks, rub them together.

If nothing happens the rocks may be the same hardness.

If one rock rubs away and grains fall onto the desk, then the one losing the grains is the softer rock.

When you rub chalk on an old-fashioned blackboard, you are rubbing a soft rock (chalk) against a harder rock (slate). The rubbed-off grains stick to the slate and we see them as writing.

Try using a chalk on a brick. Which is harder?