Auto select is used by pressing left shift while in-game unless you changed the auto select key in controls found in settings. It brings out the corresponding tool to remove the block your mouse is hovering over, place torches or to throw glowsticks.

Hovering over Tools used
Any minable blocks (Dirt, Grass, etc.) Pickaxe, Drill, Drax
Trees, wood, etc.

Axe, Hamaxe, Drax, Chainsaw

Placed objects (Wooden platform, Workbench, etc.) Pickaxe, Drill, Drax
Nothing/Out of range, closer to the player Torches, Glowsticks (When the cursor is at a minimum distance from the player)
Underwater, nothing Glowsticks
Hamdrax AS

Drax using Autoselect

Light AS

Light sources with autoselect

This feature makes mining in hostile grounds less of a hassle, since you do not need to constantly switch between different tools, torches and weapons by yourself - you just have to have your desired weapon selected and let go of the auto select key when under attack.

If you use Auto Select, certain Items such as your pickaxe or torches don't need to be kept in your hotbar, freeing up space for more weapons or other desired objects like the Magic Mirror. However, hovering over Walls will not take out your Hammer, or Hamaxe, so it's recommended to keep that in your hotbar.