Project mesh on surface (or clip face with rotation)
To place cube onto the surface of torus in this case, you should:

Enable Snap during transform tool with Shift + Tab. Turn on Face snapping mode, along with Align rotation with the snapping target. Switch snapping part onto the target to Median:


Grab your object (cube) to the desired place. Switch Transformation orietnation to Normal (with Alt + space). Turn off snapping and grab your cube along normals so it moves out of the base mesh surface (in my case it was Z axis):