If two notes sound different, one must be higher - the other lower.
The distance between the sounds is referred to as an interval.
The smallest interval is a semitone, on the guitar, one fret. Two frets or semitones make one tone.
The note immediately above C is therefore C#, the next D and so on.
On the guitar in the key of C major there are two frets between all of the notes excepting E and F and B and C.
Interval sizes are determined by counting the letters from the lowest up. C to E is C,D,E and is therefore a third.
Any interval that is counted from the tonic of the major scale to another note in the scale is a perfect or major interval.
Accidentals are symbols that represent a change to the pitch of a note, they can be sharps(#)
that raise a note by one semitone, or a fret, and flats (b) that lower a note by a semitone and naturals that return a note back
to its natural state.
On the guitar the interval between B and C, E and F is one note or fret.
The interval between all other notes two notes or frets.