Louis Pasteur did many things but is most well-known for discovering how to pasteurise milk (which is where we get the word "pasteurise"). Bacteria in the milk are killed by heating to a specific temperature and then rapidly cooling it down.
So- you are asking when to use 'when' in a sentence. When you are asking how to use when in a question, you are already using when in a sentence, because a question actually is a sentence. I like to use when in a sentence whenever I like.