Thousands of Iraqis have fled an ISIL-held town west of Mosul as Iraqi and coalition warplanes step up attacks before a ground offensive to drive out the group.

Iraqi warplanes carried out air attacks on Tuesday against Islamic State of Iraq and the Levant (ISIL, also known as ISIS) positions in Tal Afar in preparation for a ground assault to retake the town near the Syrian border, the military said.

Plans to retake Tal Afar were announced on Monday by federal police chief Lieutenant General Raed Shakir Jawdat, who said "armoured and elite units" were headed for the town.

OPINION: Post-ISIL Iraq - Breaking the cycle of violence

Tal Afar and the surrounding area is one of the last pockets territory held by ISIL in Iraq, after victory was declared against them in July in Mosul, the country's second-largest city.

The town of Tal Afar, about 150 kilometres east of the Syrian border, sits along a major road that was once a key ISIL supply route.

On Monday, hundreds of exhausted civilians were brought by Iraqi army trucks from the front line to a humanitarian collection point just west of Mosul. Many described a harrowing journey of a day or more from Tal Afar, with no food or water.

'There was nothing'

Jassem Aziz Tabo, an elderly man who arrived with his 12-member family, told The Associated Press he had left Tal Afar months ago and gone to a village on the outskirts to escape hunger, air raids and violence from ISIL.

"Those who tried to escape were captured and shot in the head. They killed my son," he said. "He tried to escape, he was caught and they killed him."

He said severe shortages have caused the price of food to skyrocket in Tal Afar, which has been besieged by Iraqi forces for months, with a kilogramme of sugar selling for $50.

"There was nothing. We were eating pieces of bread with water," he said.

Alia Imad, a mother of three whose family paid $300 to a smuggler to lead them to safety, said there is no drinking water left in the town. "Most people drink water that's not clean. The majority are surviving on that and a bit of bread," she said.

The group she was with had come under fire during their escape from ISIL, she said. A woman was killed, and they had to bury her by the road.

Lise Grande, the UN humanitarian coordinator, told AP that the conditions in Tal Afar are "very tough".

"Thousands of people are leaving, seeking safety and assistance. Families escaping northeast are trekking 10 and up to 20 hours to reach mustering points. They are exhausted and many are dehydrated when they finally arrive," she said.

Shia groups to take part in battle

Anwar Hama, of the Iraqi air force, told AP that air raids this week have targeted ISIL headquarters, tunnels and weapons' stores.

But Iraqi forces, closely backed by the US-led coalition, are not expected to push into the town for another few weeks, according to an Iraqi officer overseeing the operation. He spoke on condition of anonymity in line with regulations.

Iraqi army, federal police and special forces units are expected to participate in the operation, as well as state-sanctioned mostly Shia armed groups known as the Popular Mobilisation Forces.

The Shia fighters largely stayed out of the operation to retake Mosul, a mostly Sunni city, but have vowed to play a bigger role in Tal Afar, which was mostly Shia before it fell to ISIL. Shia fighters captured Tal Afar's airport, on the outskirts of the town, last year.

READ MORE: How ISIL used government workers to control Mosul

Their participation in the coming offensive could heighten sectarian and regional tensions. Tal Afar was once home to Shia and Sunni Arabs, as well as a sizable ethnic Turkmen community with close ties to neighbouring Turkey.

Turkish officials have expressed concern that once territory is liberated from ISIL, Iraqi Kurdish or Shia forces may push out Sunni Arabs or ethnic Turkmen.

On Monday, the Iraqi army began moving an armoured brigade to the front line south of Tal Afar, while an infantry division was deployed about 30km to the town's east.

The United Nations says some 49,000 people have fled the Tal Afar district since April, compounding a humanitarian crisis that has lingered despite the cessation of major fighting inside Mosul.

It says nearly a million people were displaced by the Mosul campaign.