how is metal and stone extract from its ore