When you place a solid Mg ribbon into the blue CuSO4 solution, a metal displacement reaction occurs. The overall reaction is: Mg(s) + CuSO4(aq) --> MgSO4(aq) + Cu(s); the magnesium, because it is more reactive than copper, displaces it. The blue solution will turn reddish black with the introduction of Mg.