The word "but" is a conjunction, and it's generally only followed by a comma when it's used to connect two independent clauses.
For example:
* Correct: I wanted to go to the beach, but it was raining.
* Incorrect: But, it was raining.
Here's why:
* "But" at the beginning of a sentence introduces a new independent clause. This means it doesn't need to be set off with a comma because it's not part of a longer phrase.
* When "but" is used as a conjunction to link two independent clauses, it's followed by a comma. This helps to separate the two clauses and ensure proper reading flow.
Remember, there are always exceptions in grammar, so if you're ever unsure, consult a style guide or a grammar resource.