Both "but" and "whereas" introduce a contrast between two sentences. In the case of "but" the contrast is usually stronger, more opposing:
"I don't like sport in general, but I actually enjoy playing soccer"
however, "whereas" is used to compare two opposing sentences:
"This burger is tasty and juicy, whereas this other one is slightly overcooked"