While and whilst have the same meaning: both mean “during the time that.” They are, in fact, different variations on the same word, and neither is technically incorrect or correct.
While is generally preferred in U.S./American English:
Whilst is more common in U.K./British English, although people may use both words:
When to Use While vs. Whilst
This is actually a regional spelling difference for the same word, specifically the difference between British English and American English.
Both while and whilst have the same meaning: “during the time that.” Strictly speaking, neither spelling is incorrect within its own region. But, like other regional spelling variants (color/colour, labor/labour, fiber/fibre, spelled/spelt), a variant may look odd to those accustomed to the other spelling.
Though while is generally preferred in U.S./American English and whilst is more common in U.K./British English, people may swap between the two versions. (Some find that “whilst” sounds old fashioned and stodgy.)
When in doubt, use “while.”
Examples of While vs. Whilst
(In this sentence, the American version is used.)
(In this sentence, the U.K. version is used.)