Rocks are used to craft Cobblestone and can be obtained from sifting Dirt in a Sieve. Each Dirt block sifted yields one Rock and you can combine 9 of them in a Workbench to craft one Cobblestone.

Rocks to Cobblestone Recipe
Right-clicking with a Rock will throw it and deal a single point of damage and some knockback to any mob it hits. Useful for knocking mobs off the edge of your island.

Rocks are mainly designed as a way to get started in the Hard Mode island.