You can use the SetHeights function of the terrain’s TerrainData object to change the height of areas of the heightmap. However, each point on the terrain is just a single height value, so it is not possible to have “undercuts”. If these are necessary for the game then you may need to look at voxels or other more advanced techniques - the MetaBalls script on the Unify wiki might be a good starting point for things like this.
As for dragging physics objects, Unity comes with a script called Drag Rigidbody in its standard assets. You just need to attach this script to an object (eg, the camera) and you will be able to drag rigidbody objects in the scene using the mouse. Although this is often surprisingly effective, you may need to adapt it to suit your game. For example, you can use joints to restrict the object’s movement to avoid the rigidbody getting out of control.