Along the neck of the guitar, there are many thin metal rods running perpendicular to the strings. These rods are known as frets. All of the frets together make up a fretboard.
Frets are placed on a guitar to make it easier to produce "true" notes. When you push down on any string of the guitar, the next fret (on the right if you play right handed) is the actual end point of the string. When you place your finger on the area between the 1st and 2nd fret, your finger is considered to be on the 2nd fret because that is where the string is touching.
The fret closest to the head of the guitar is considered the first fret and as you slide up the neck you hit the second, the third, and so on. When you move toward the body of the guitar, you are going up the neck and when you go toward the head, you are going down the neck. These sayings go with the pitch of sound created. As you move up the neck, your sound gets higher. When you move down the neck, your sound gets lower.
As you move up a fret, you pitch goes up by half a note. This means that if the note you were on was a C, if you move up one fret you are now playing a C# or C sharp.
As the string gets shorter, it creates higher sounds. When you push down on a fret, you are shortening the string. The lower number frets create lower sounds
When making chords, you are required to place you fingers on different strings and within different frets. When you play a single string at a time, the frets change the pitch within that string.
Frets allow you to hit many different notes with only 6 strings. Whe you reach the 12th fret on any string, you will be playing the same note as that string when it is open, but one octave higher. An octave is when you have gone through all 7 notes and have come to the 8th which is identical to the 1st but higher or lower. Example: A B C D E F G A.
Frets are often marked with dots or diamonds to help you find certain frets faster. The first fret marked is the 3rd, then 5th, 7th, 9th, 12th, etc. The 12th fret is usually marked with two dots on top of one another.
Frets also become closer together as you move up the neck of the guitar.
Below is a picture of a fret board.