When you start breaking a block, the correct tool is automatically swapped into your hand from anywhere in your inventory.
Pickaxe -> stone, ores, metals | Axe -> wood, logs | Shovel -> dirt, sand, gravel, snow.