What would you keep copper from corroding when attached to a different metal?

What would you keep copper from corroding when attached to a different metal?