An accidental is an alteration of a diatonic note using a sharp or flat. In other words a flat or sharp used to take a note outside of the key or key signature. Accidentals last only for the measure in which they are written.