(a) The iron reacts with the acid and dissolves as iron(II) chloride, giving off hydrogen:
Fe(s)+2HCl(aq)→FeCl2(aq)+H2(g)
The filtrate is iron(II) chloride solution, which is pale green. The copper filings do not react and are left on the filter paper.
(b) Only metals that lie above hydrogen in the reactivity series can displace hydrogen from a dilute acid. Iron is above hydrogen, so it reacts. Copper is below hydrogen, so it does not react with dilute hydrochloric acid at all.
Because the acid is in excess and stirring continues until no more gas is given off, all the iron is used up. The residue on the filter paper is therefore copper only. It is washed with water to remove the acid and the iron(II) chloride solution, and then dried, giving pure copper. The difference in reactivity has been used to separate the two metals.

The reactivity series: what each metal reacts with, and how it is obtained from its ore.