This is a very simple question. The two words are exactly the same and can be replaced for each other. The words have been differentiated due to the pleasing sounds of the speech or changing the tone of talk. While is usually followed by a pronoun or noun but whilst cannot be. Whilst is a very British form of saying while where as while is very much American. The words can not be replaced with each other easily. For example, 'he was watching TV while eating his food' and you can say 'he was watching TV whilst eating food'. There is no big difference in the meaning but the usage of the word is very much different.
You can refer to grammar books of your grade and check it out over there. You can check it out even on the internet.
You can refer to grammar books of your grade and check it out over there. You can check it out even on the internet.