The Natural sign is used to reverse the effect of Sharps and Flats whether they are used as Accidentals in a bar or as part of the Key Signature. In the first example below, the second note has a Natural placed in front of it and must be raised a semitone as the natural has cancelled the effect of the Flat used earlier in the bar.
The example below shows how a bar line also cancels an accidental, notice that the F note in the second bar is not F# but F natural. The accidentals only rule for the duration of the bar. Also notice that the middle C note in the second bar is not affected by the Sharp used on the note before it. The accidentals don't affect notes in upper or lower octaves.
These last two examples show how Naturals are used to cancel the sharps or flats in a Key Signature.
For more information check out the Sharps and Flats pages as well.