Depending on how bad the scratches are, you can either do it yourself, or if they're bad, take the guitar to a luthier/reputable repair person for a crown & polish.
To do it yourself, just tape off the fretboard so you don't end up scratching it, and buff the frets with some very fine
steel wool or a very fine synthetic abrasive pad.