An alloy is a material composed of two or more metals or a metal and a nonmetal. And, they are usually formed by heating the elements to their melting points, and then cooling them, so that the components mix. Now, why doesn't this works backwards i.e. if we heat the alloy again to melting point of their constituents, and they should separate?
If you melt the alloy and then use electrolysis, or if you use a redox reaction, you should be able to separate the components.
For example, if you used a basic acid, let's say hydrochloric acid, on a zinc-copper alloy, I'd imagine the zinc would be removed from the alloy and taking the hydrogen's place, forming zinc chloride, leaving hydrogen gas and copper metal.
This is based off of simple redox reaction memories and no personal experience. However, if you're curious, try it out!
Once the alloy has been formed the atoms from the different metals will have shared there electrons with each other and come to an equilibrium. In this state the metal atoms have formed a complex structure which has a different reactivity or properties than each individual metal did in its original form .