Short answer
Pickaxes came with the Mining Update — code mineSite gives 2 free pickaxes, according to the official game page. How mining works has not been documented yet.
Getting pickaxes
Code mineSite — 2 free pickaxes per the official game page (Destructoid reports 3). Redeem it in the Shop.
How mining works
Not documented yet. Everything we know about the update is on the Mining Update page. This page will get the mining details once they are captured in-game.