In general terms,
Concentration, the reduction potential of the metal cation, and the oxidizing strength of the anode. If there are others, please edit them in!
For instance, if I have a magnesium anode and a aqueous copper sulfate solution in the cathode. This reaction will occur (very) readily:
Magnesium has very high oxidizing strength and copper has a fair reduction potential. The magnesium oxidization will supply many electrons for the copper cations to be reduced,