Errors on a check could include a misspelling of your name or the check being written to a different name. It is illegal to correct any error on a check on your own. Fortunately, there are other methods of correcting the error so you can still cash or deposit the instrument.
Options for Presenting the Check
Your bank might overlook a minor misspelling or variation in the payee name if it is still recognizable as your name. Most will allow you to deposit the check if it is substantially close to the name on your account. You could also endorse the check with the payee name as spelled, then endorse below this with the correct spelling of your name. If the payee is another person entirely, they can endorse the check over to you specifically by writing on it "Pay to the order of [your name]."
Reissuing the Check
You could have the check reissued if it has been written to a different person who is unavailable or the spelling of the payee name is substantially different from the way you spell yours. You would have to return the original check to the issuer.