Although banjo players use a variety of tunings to play different kinds of songs and to create different moods on their instrument, the most frequently used tuning is called G tuning. With this tuning, the five open strings of the banjo are tuned to the notes of a G major chord (a chord is a collection of three or more notes played together).
Here are the pitches used for each string in G tuning:
5th string: G
4th string: D
3rd string: G
2nd string: B
1st string: D
Note that only three different pitches are used in G tuning: G, B, and D. These three notes make up the G major chord. The 1st-string D and 5th-string G are one octave higher in pitch than their 4th- and 3rd-string counterparts.
Your ears hear the two D notes and the two G notes as being essentially the same, but you can also hear that the 1st and 5th strings are higher in pitch.
Musicians long ago decided to assign the same letter name to pitches that you hear in this way, but they also recognized that the two D's and the two G's aren't exactly the same pitch. They're one octave apart, with the octave being the point where that same note is repeated again but at a higher pitch.
This figure shows the pitches of each string in G tuning along with a fretboard image summarizing the relative tuning relationships between the strings.