When an iron nail is dipped in the solution of CuSO4, it displaces copper from the solution, which gets deposited / precipitated as a red / red-brown residue. Also, the blue colour of the solution gradually fades out. Ultimately in the solution becomes pales green in colour due to the formation of FeSO4.