I highly recommend you learn to play on an acoustic guitar, and with an instructor if possible.
Selecting a guitar:
The two major kinds of guitars for your purposes are electric guitars and acoustic guitars.
Acoustic guitars are further divided into two types: Steel-string or "folk" guitars on the one hand, and nylon-string or "classical" guitars on the other hand. Both are good kinds of guitars to learn on. The nylon-string classical guitar requires less strength in your fretting hand, and calluses will take less time to build up. However, if you have smaller hands, the steel-string "folk" guitar will be easier for you to learn, because the fretboard is narrower than on a classical guitar.
One of the hardest parts of learning how to play guitar is building up strength in your fretting hand, the hand you will use to press the strings down to the fretboard (usually the left hand); and also building up calluses on your fingertips. While these take more time on an acoustic guitar than on an electric guitar, I still recommend learning acoustic guitar first for this reason: It's not difficult to learn to play the electric guitar after having originally learned to play on the acoustic guitar, but the reverse is not true. Making the leap from electric to acoustic guitar is more difficult.
Electric guitars introduce additional elements of complexity, including different pickup combinations, and (on some guitars) additional mechanical elements. A simpler instrument will allow you to concentrate on learning chords and notes rather than learning about pickup combinations and amplifier settings. Also, the amplifier on an electric guitar is really a part of the instrument, and guitar amps can be somewhat complex.
Learning on your own versus learning with a teacher or a group:
Learning an instrument on your own can be frustrating, particularly if it's your first instrument. It's certainly possible to learn mostly on your own, particularly if you're very dedicated and patient. Learning any instrument requires patience and, most importantly, practice.
A good teacher will tailor their lessons to address your weaknesses. If you have difficulties in a particular area, an experienced instructor will spend more time in that area. (A good sign of a bad teacher is when they don't do this and rigidly stick to a predetermined lesson plan.) However, this is more expensive than learning on your own or in a group.
Learning on your own offers you the opportunity to go at your own pace, and it can be inexpensive. However, this can be a detriment; knowing that you have a lesson on Tuesday is a good impetus to practice before then!
If you have a friend who plays guitar well, that friend is a great resource if they have the time and are willing to teach you.
If you can't afford lessons for an extended period of time, consider combining the two approaches: Pay for a few lessons to get you started, then learn on your own.
Conclusion
In summary, the best way to learn guitar is with an acoustic instrument that's good enough that you'll like playing it, but within your means. If possible, I suggest learning with a teacher or a group, but there's no correct way to do this. While it may not be as pleasurable or as quick, you can learn on any guitar, and completely on your own. Whatever you do, remember that you need to pus in the time practicing, but playing guitar is supposed to be fun; it won't take long before it is.