The difference can be exaplined by differentiating b/w SN1 and SN2 reactions for these unstaurated compunds.
From Chemistry point of view there are 2 steroisomers formed .
R and S configuration.
From SN2 this point is iverted and SN1 thus follows the sterochemistry.