The US has banned visitors from 12 countries like Afghanistan, Haiti and Iran, with stricter border controls on another seven countries.