Heating the clay makes it hard (solid) .
She is a hard (industrious) worker.
It was a hard (difficult) test.
Hardly is an adverb and means only just or certainly not.
The teacher spoke so quietly I could hardly (only just) hear her.
You can hardly (certainly not) expect me to do the test for you!