First, if you don’t have a guitar, don’t buy one right away. Borrow one from a friend. You’ll buy one that fits your needs once you have started to play and have figured out what type of guitar is right for you.
Once you have found a guitar, if you don’t have a tuner, you can use a tuning fork, or find a video like this one to get the right notes.
Martin Taylor explains how to tune your guitar, and how to verify its tuning.
James Taylor (same family name, different family…) demonstrates his approach to (fine) tuning.
Once your guitar is tuned, pick a song that you like, preferably a folk song that you know well and that you can sing. It could be You are my sunshine or Row, row your boat, or any song that has been part of your musical upbringing. Here is You are my sunshine in the key of G, but there are many others that show how to play the chords in different keys.