There are several questions to ask yourself when buying a guitar:
Who am I buying It For?
Are you buying a guitar for a beginner, for yourself, for a moderately experienced player or for an expert?
If you are buying for a beginner, one thing you might do is to include that beginner in your decision. If the guitarist-to-be envisions him/her self a future rock star, then that beautifully made classical guitar is probably not the ticket! There are relatively inexpensive models of almost every guitar played by the stars, so have a chat--find out which guitarist has captured your beginner's fancy. Besides it is a good opportunity to spend some quality time together!
If you are buying a guitar for yourself, ask yourself what you want to do with the guitar. Do you want to eventually join a band? Are you already in a band and want to upgrade? Do you want to play fun songs for your children or your students? The possibilities are endless, but your answers will in large part determine the type of guitar that you should buy.
Are you buying a guitar for an expert? This is very tricky, as most experts, and even most intermediate players tend to be EXTREMELY opinionated about their choice of a guitar. The best thing to do is to let the expert pick the guitar. A happy expert is much more satisfying than the joy of an "embarrassing" surprise!
Acoustic or Electric?
Again, this depends on what you want to do with the guitar. If you want to play soft music with little or no amplification, you want acoustic. If you want a more powerful amplified sound, electric is the way to go.
As to whether a beginner should start first on acoustic, my opinion is--NOT NECESSARILY. For one thing, an electric guitar is what most young beginners have in mind. For another,electric guitars tend to be easier to play in the beginning. Since playing the guitar is a CHOICE, you want the experience to be pleasant. On the other hand, there is nothing wrong with starting on an acoustic guitar if that is what the person wants.
How Much Can I Afford To Spend?
My general advice here is buy the best quality guitar that you can afford. In other words, it is best not to buy a cheap low quality guitar even for a beginner. A very poor quality guitar does not sound good and is harder to play. It is important for a beginning guitarist to like the way they sound. I tell parents that if I cannot make a particular guitar sound good, then what chance does the student have? Besides, you can get more trade-in or resale value with a good quality guitar.
There are, however, two sides to every question. The other side of this one is that it is probably not wise to go all out by buying-a-guitar for $3000 in the beginning. For one thing, few beginners will understand the importance of caring for such a high quality instrument. For another, as players progress, they develop very specific ideas about what they want. Also, you don't want to make your guitar teacher jealous! (just kidding--well...)
Once you have answered these questions, you are ready to go shopping!
A word about shopping: Once you have shopped the local music stores, tried out guitars, and made your decision, consider ordering from one of the online music stores. Often you can get better bargains! I have purchased virtually ALL of my equipment (drums, guitars, amps, PA system, recording equipment,etc.) from online stores. I have found them to be fair and honest and to deliver quality equipment. Plus shipping is usually free!