Iron is a metal and thus has strong intermolecular forces of attraction.Therefore, it is not broken into small particles on hammering whereas chalk is an amorphous solid and has weak or not so strong intermolecular forces and thus can be broken into small pieces.