First, as an idiom, hard and fast means well-defined and without exception. It is most often used with the word “rule” as in:

There are hard and fast rules about registering for class.

There are no hard and fast rules for learning English.

But, actually, that’s not the main topic for this post. The real topic is that hard and fast are two very common words that can be used as both an adjective or an adverb.

That boy is very fast. (adjective)

That boy runs very fast. (adverb)

Hard work is good for you. (adjective)

He ran hard. (adverb)

Many adverbs are formed by adding -ly to the adjective:

slow -> slowly

angry -> angrily

quick -> quickly

But fast and hard are exceptions to this rule. Fastly is not a word at all. Hardly is an adverb, but it does not mean “to do something with great effort.”

I’ll explain how to use hardly correctly sometime next week.