When should whilst be used instead of while?
For example, should I use the first or the second sentence?
They don't do this whilst they do that.
They don't do this while they do that.
What would be correct?
I believe while and whilst are interchangeable, but whilst is more archaic and adds a nice flavoring to the sentence.
That being said, "whilst" doesn't seem to come up so often in the middle of a sentence as you had it there, so I would use "while" in that case, even though both are grammatically correct. Whilst seems more apt to be put at the beginnings of sentences, e.g.
"Whilst" and "while" are interchangeable. The difference between the two is "whilst" is British English and "while" is American English.