The prepositions during, for, and while are often used with time time expressions. Let's take a look at the difference in usage between during, for, and while.
during is a preposition which is used before a noun (during + noun) to say when something happens. It does not tell us how long it happened. For example:
"Nobody spoke during the presentation."
"We get plenty of snow here during the winter."
When is used to talk about two things that are happening at the same time. The length of time is not important. Remember that while is used with a subject and a verb (while + subject + verb). For example:
"The phone rang while I was watching TV."
"I met him while we were studying in the library."
For is a preposition which is used with a period to say how long something goes on:
"Simon has been sleeping for 8 hours."
"We waited for 30 minutes outside your house."