The Iodide reduces the lead to Pb(II) and the Pb oxidizes the Iodide to Iodine $(I_2)$. Since iodide is not a strong enough reducing agent to reduce Pb(II) to Pb, the ionic compound$PbI_2$ is formed. $Pb_{4+}$ , being a strong acid (strong oxidant) will take up electrons from soft base (have fairly good reducing power) I- to oxidise it to $I_2$ and it self will reduce to $Pb_{2+}$ to form $PbI_2$.