When there's a sharp in the key signature, say, on the G in the treble clef, it means every G in that piece will be played as a G♯.
To cancel that, there needs to be a natural or flat sign just before the note affected. That will then last until - the end of the bar it's in, or - it's changed by another accidental to say what it'll be next. But regardless, in the very next bar, it will need to be played as G♯ again - unless affected by yet another natural or flat sign.
Those accidentals will only affect notes in the particular octave tey're written in - any other G notes in other octaves will still be G♯.