Basically "un clavo saca a otro clavo" literally translates to "one nail drives out another"
It's a metaphor to love.
A heartbreak can be relieved by the love another person.
And I think it's true. I've seen people ***** so much about being heart broken yet in a manner of 2 or so...