While this word is extremely useful, once in a whileit can be hazardous, as Tim Bowen explains ...

While is most commonly used as a conjunction but it can also function as a noun and as a verb.

As a conjunction, it is usually used to refer to time, as in ‘Someone called while you were out’ and ‘Could you look after the children while I cook lunch?’. It can also be used to compare things, situations or people and show how they are different, for example ‘While most people look forward to retirement, some cannot bear the thought’ and ‘The south of the country grows richer, while the north grows poorer’. In relatively formal situations while can also be used to say that although you accept that something is true, there are also doubts or facts that you cannot ignore, as in ‘While I agree with you, I do not believe that your way is best’.

As a noun, while means ‘a period of time’, as in 'It's been a while since I saw her', 'I've been waiting for her for quite a while' and 'Couldn't you stay just a little while longer?’ It is also used in the phrase all the while, meaning all the time that something is or was happening, as in ‘She pretended to be asleep, but all the while she was watching him’. The phrase once in a while means ‘sometimes, but not very often’, as in ‘I don’t usually drink alcohol but I have a glass of wine once in a while’. 

As a verb, while is only found in the phrasal verb to while away, meaning to spend time in a relaxed way when you have nothing else to do, as in ‘We whiled away the afternoon sitting by the lake’.

In some parts of northern England, and Yorkshire in particular, while is also a preposition meaning until, which has caused particular problems with the warning signs seen at level crossings, for example ‘Do not cross while the red light is flashing’.