Could someone explain to me the difference between whereas and while?
It is a subtle difference. Whereas can be replaced with "on the other hand"; while can be replaced with "however".
Whereas = conjunction in contrast or comparison with the fact that; taking into consideration the fact that.
Bob was quite the rudest man I have ever met whereas John was a great guy.
Bob was quite the rudest man I have ever met; on the other hand John was a great guy.
While = • conjunction compared with the fact that; but
John is so polite while Bob is incredibly rude
John is so polite; however, Bob is incredibly rude