Adverbs modify verbs, adjectives, or other adverbs. In this case, "hardly" modifies the verb by indicating a low degree or amount of something. For example:
* "I hardly knew him." (modifies "knew" by indicating a low degree of knowledge)
* "It was hardly a surprise." (modifies "surprise" by indicating a low degree of surprise)
Let me know if you have any other questions!