I hard-boiled the eggs.

Literal

Egg [object-を] hard-ly boiled.

硬く is the adverbial form of the i-adjective 硬い ('hard, rigid') — i-adjectives form adverbs by replacing い with く. 茹でる specifically means 'to boil [food]' as a cooking method, as distinct from 沸かす ('to bring water to a boil') or 煮る ('to simmer'). Cooking verbs in Japanese are precise.