MuseScore -- Index -- Accidentals

Accidentals can be set or changed by dragging an accidental symbol from the accidental palette to a note in the score.

If you only want to change the pitch of a note you can also select the note and:

<Up> Increase the pitch of a note for one semitone.
<Down> Decrease the pitch of a note for one semitone.
<Shift+Up> Increase the pitch of a note for one octave.
<Shift+Down> Decrease the pitch of a note for one Octave.

MuseScore automatically tries to set an appropriate accidental for the changed pitch. If you don't agree with this or you want to place an cautionary accidental (editorial accidental), then you have to manually drag an accidental from the accidental palette to the note. If you again change the pitch with cursor keys, this manual set accidental will be lost.

The menu function <Notes/Pitch spell> tries to guess the right accidentals for the whole score.