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:

Accidentals palette
Up Increase the pitch of a note for one semitone.
Down Decrease the pitch of a note for one semitone.
Ctrl + Up Increase the pitch of a note for one octave.
Ctrl + Down Decrease the pitch of a note for one cctave.

MuseScore automatically tries to set an appropriate accidental for the changed pitch. If you do not 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 later change the pitch with cursor keys, manual settings to the accidental will be lost.

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