In general the mechanism is through efflux of toxic ions. In relation to your prior questions I suggest you start by reading a review on the subject. I have included two papers below. I have a hypothesis that the efflux proteins responsible for heavy metals may have developed the capability to efflux antibiotics as well by perhaps a divergent evolutionary process. With that said I would be interested to see whether a comparative analysis on antibiotic efflux proteins and heavy metal efflux proteins, yielded any evidence for such a process.
"Implications of Microbial Heavy Metal Tolerance in the Environment"