The sound of the mandolin is a very curious sound because it's cheerful and melancholy at the same time, and I think it comes from that shadow string, the double strings. - Rita Dove
The body of mandolins usually come in either oval or tear drop shape, with a sound hole. Traditional mandolins had different number of strings, whereas those manufactured today generally have four pairs of strings.
This makes a total of eight strings in four string courses. Getting the instrument in tune is one of the main lessons of how to play a mandolin. It is certain that every stringed instrument needs tuning to sound precise, so is true for the mandolin.
Due to the flexibility in the number of strings on a mandolin, tunings can differ widely. If a standard tuning pattern is to be thought of on a mandolin with four double courses of strings, you will have to follow the G-D-A-E pattern, similar to how a typical violin is tuned.
Generally, the secondary adjacent strings are tuned to the same sound as primary ones, but at a higher pitch. But this again depends on the creativity of the musician. Professional mandolin players can even use cross-tunings which pertain to adjacent strings tuned to a tone different from their respective primary ones.
Mandolinists can even tune the strings to that of the first four strings of a guitar, so as to match chord patterns of the guitar fretboard. So, in this manner of mandolin tuning, chords would need to be held much in the same way as that of a guitar.
For tuning the mandolin in the G-D-A-E format, play the 'G' sound from the source; which can be a piano, an instrument tuner, or a guitar. The heads on the mandolin tuning machines are to be adjusted for getting the accurate sounds.
By turning the tuning heads, match the sound of the last string to that of the sound being played. Also tune the adjacent string to the same sound. Change the sound from the source to 'D' and start tuning the third string, after which you will have to tune the secondary one to the same tone.
Follow this procedure to tune the first and second set of strings to the 'E' and 'A' sound respectively. Now, fret the last set of strings on the seventh fret on the fingerboard and play. If the sound is the same as that of the 'D' strings, the third and fourth string sets are in tune.
In order to check the tune of second and third string sets, follow the same procedure of holding the note on the seventh fret of the third course of strings, plucking it, and matching the sound with that of the second. Repeat the same process for ensuring the exact tuning of the first and second course of strings.
Tuning any stringed musical instrument is versatile and can be done as per your own preferences and sound tastes. Hence, you can even come up with your own versions of mandolin tunings to set the sound and chord patterns that you are comfortable with.