Using a displacement reaction we can put a more reactive metal into cobalt sulphate of where the more reactive metal (such as zinc, aluminium or magnesium) will displace cobalt out of the solution leaving the elemental form of cobalt metal deposit left in a solution of (whatever metal you chose) sulphate.