Thousands of people have fled Afghanistan as Taliban insurgents continued its offensive in the country.