Why do we use acids for heavy metal extraction?

When we are doing heavy metal extractions from plant samples we use acids like HNO3 or HCL .
I want to know what is the importance of these acids in extraction and I need to know about the mechanism of the action of the acids.