和 means 'and', and so does 而. What is the difference between the two. I also know that 而 means 'but', and the second question is what is the difference between 而 and 但. Give me an example sentence, please.
When you use 而, you are always expressing some kind of adversative meaning weaker than 但. Most of the time they can substitute each other but not 100% certain.
Example 1: both are fine
这件事很难，而那件事很容易。 => This thing is difficult while that one is easy.
这件事很难，但那件事很容易。 => This thing is difficult but that one is easy.
Example 2: 而 is better here
他没有出国，而是留在了国内。 => He stayed in home country instead of going abroad.
Example 3: 但 is better
这杯水不甜，但富含营养。 => This cup of water is not sweet but full of nutrition.
The differencies are subtle, taste them in more practice.
It's clearer to distinguish 而 from 和. Remember 和 has no adversative meaning, and in most cases it connects objects:
Tom and Jerry are good friends.
The corresponding is:
and<->和 while<->而 but<->但
when they are used as conjunction. One want to give a comparison when he use 而.
和and 而can substitute occasionally when 而 connect two adjective or verb ,but it is not very natural,I'd think it is similation of words like "and" in Egnlish or other European language ,for examples 她堅強而果斷的態度十分吸引人=》她堅強和果斷的態度十分吸引人。 他們堅持和推進了問題的解決=》他們堅持而（而且）推進了問題的解決