Here are some examples:
* I wanted to go to the beach, but it was raining. (The contrasting ideas are wanting to go to the beach and it raining.)
* The food was delicious, but the service was slow. (The contrasting ideas are the delicious food and the slow service.)
* She's a great student, but she struggles with math. (The contrasting ideas are being a great student and struggling with math.)
Important Note: You don't use a comma before "but" if it's part of a simple phrase, like "I went to the store but didn't find anything."
Let me know if you'd like more examples!