Hardening means that the mechanical properties of materials are improved by controlling the dislocation mobility of a material.
When a metal breaks, it occurs due to a crack which splits the material more or less quickly. This crack propagates almost exclusively along the grain boundaries, that is, in the space between the grains. Each time the crack meets a grain, its propagation line hurts the growth. Therefore, the cracking is inhibited by obstacles in its propagation direction.
If the grains are small, the crack must travel in a crooked path which gives better mechanical properties. Small atoms in the grain boundary can also be a barrier to cracking.