There are so many ways to tune a guitar, but I prefer most is to use a smartphone app. In this era, it's hard to find someone who doesn't use a smartphone.
Like any musical instrument, the guitar also needs tuning. Many people would recommend getting and using a guitar tuner. This would produce the sound of the notes that the guitar should be making. Sometimes, you can compare the sound of the notes on a guitar with that on another instrument like a piano. Only use another instrument if you don’t have a guitar tuner.
Then focus on each note. Start with the lowest note and strum it and then twist the tuning pegs until the sound is the same as the guitar tuner or piano. Then go to the next lowest note and do the same thing. Twist the tuning pegs until that note sounds right. Continue with each note until you reach the highest note.