* Igneous rocks form from the cooling and solidification of molten rock (magma or lava). This process creates a tightly interlocked crystalline structure, making them very dense and strong. Examples include granite, basalt, and obsidian.
* Sedimentary rocks are formed from the accumulation and cementation of sediments. While some sedimentary rocks can be quite strong, they often have weaker bonds between the individual grains. This makes them more susceptible to breaking. Examples include sandstone, limestone, and shale.
However, it's important to remember that both igneous and sedimentary rocks have a wide range of hardness. Some igneous rocks, like pumice, are very porous and weak, while some sedimentary rocks, like quartzite, are extremely hard. The specific type of rock will determine how easily it can be broken with a hammer.