This is a difficult question as the instrument you buy can either encourage you to play or put you off learning. Probably the first thing to decide is your budget. Generally more expensive guitars are better quality, sound nicer and are easier to play but for a first guitar they are more than likely going to be too expensive. Set your budget and try to get the best guitar you can within that price range.
Secondly if you don’t have much experience with guitars I would suggest buying a well-known brand such as Yamaha, Fender, Epiphone and there are plenty more. It doesn’t guarantee anything but there is a better chance that a guitar from a well-known brand will be of a certain quality.
Thirdly, for acoustic/classical guitars, if your budget will stretch to it, a guitar with a ‘solid top’ will sound nicer, these are usually more expensive than the very first entry level models. A ‘solid top’ just means that the top of the guitar (the front bit with the hole in it!) is made from one piece of solid wood and not from several layers of laminate. Sometimes it’s good to try expensive guitars because then you know what you should be looking for in terms of sound and playability.
Finally do some research, ask friends what brand of guitar they have and obviously what they think of it. If you’re not confident in your playing ability maybe try to bring a friend who can play to the store to help – they can play the guitars and you can listen, maybe you’ll like the sound of one guitar more. Ask for advice in the music store, but obviously use your own judgement.
Avoid buying really cheap guitars from supermarkets, not mentioning any names but any of these that I’ve seen have been atrocious and unplayable and would definitely put you off playing the guitar. Support your local music shop instead, they specialise in selling instruments not bananas
Best of luck choosing a guitar and let me know what you buy.