If they vote to leave will all those migrants from EU have to pack their bags and hit the road ?
No, it will make no difference to them. New legislation does not apply retrospectively. Only new arrivals from the EU will have to get a UK visa after a Brexit. Also, under EU rules, it would be 2 years before the UK actually leaves the EU, so in the meantime any EU citizens who want to go live in the UK could do so. A Brexit vote may open the floodgates to a wave of new EU immigration!
If the UK wants a free trade agreement with the EU it will have to allow the free movement of EU citizens into the UK. (Just like Norway currently does for its F.T.A. even though it's not an EU member.)