While I am in favor of a teacher to guide you as mentioned in the first two answers I would like to expand on all of this.
The first thing is getting a guitar.
If you already have one, have your teacher check it out.
Also, have your teacher show you how to care for the instrument, and how it should be set up, as well as going to a good luthier for a set up.
I would recommend a nylon string acoustic guitar for starters.
When I was 12 years
oldI wanted an electric more than anything
but when Christmas arrived that year, I was fortunate to be given a nylon string acoustic.
Although I was a bit disappointed I quickly learned that having a nylon string guitar was better for me as a beginner as it was so much easier on my fingers before I developed calluses--a steel string would have made this a lot harder to learn.
I had already started piano when I was 10 so having 2 years of piano and basic music theory
helped me start learning scales, chords, and arpeggios from the start.
It wasn't until a year or so later that I took a few lessons.
If I was headed for classical or jazz guitar I would have continued the lessons, but soon I was in a rock band and learning pop songs which was what I wanted.
I encourage you to hook up with like minded folks and play music together even if it does not lead to gigs.
Working with others is a great way to learn to play live, on time, and make music.
I eventually moved over to electric bass and played in a blues band during my high school years.
This was a great experience to learn how to be a part of a rhythm section and how to support the beat.
By this time I had acquired a couple of electric guitars and was still learning on my own.
I eventually studied composition in college and graduate school.
I have always had a guitar handy to compose with as well as access to a piano which for composing are very helpful tools.
Many years later, I returned to blues and got a stratocaster and a vintage fender black face amp and still play these with a small collection of other electrics and amps too.
I jam with pals but rarely play gigs, but love playing.
I always find new things to learn
so I mention this, as guitar like anything artful has no end to learning and expressing.
My focus is composition and making music for my own films so my development has a lot to do with the music that I think works on my current video project.
Summary:
Get a good starter guitar that will facilitate learning.
Get lessons from a teacher that can guide you to the music you want most to learn.
Work in an ensemble or combo to get use to playing with others.
Continue your development as your passion drives you, take music theory in college or high school or if you're beyond that age, take night or weekend classes at your local junior college or continuing adult education center.
Never give up, keep working on the things that you want to master, and you can always find a teacher if you get stuck.
And finally, be willing to take chances, don't be afraid to learn things that seem impossible now.
music.stackexchange.com/users/2076/filzilla
Guitar can be strictly taught and played or it can be completely free-form in your approach.
There is no hard and fast rule.
Certainly, getting a teacher is preferred but not mandatory at all.
As a former full-time (and current part-time)
teacher, I wouldn't worry about bad habits at first.
Just try to have fun.
To that end, I learned to play, initially, by using songbooks with chord diagrams at each place the chord is to be played.
This way, I didn't have to remember the fingering.
This is what I recommend to students that are looking for extra activities.
music.stackexchange.com/users/2557/B0nk3r
I've never played guitar, but from my piano experience I'd recommend spending money on a teacher.
That way you're forcing yourself to learn and you chop your learning time down to minimal.
Find one who you think "just seems cool" and see how it goes.
good luck to ya.
music.stackexchange.com/users/2248/Stephen Hazel
If you want to be pro-active.
Try learning a song by ear.
A snippet, a melody.
Something you like.
Then take it to a teacher, or try video chat with a teacher.
This way you are working on something, but not letting bad technique get ingrained too long in the muscle-memory part of playing music.
music.stackexchange.com/users/288/Rene Marcelo
I would add that sometimes the best approach is having both a teacher and practicing/learning things you like by yourself, that way you have the structure that having a teacher gives you and the motivation to go on because of learning what you like.
music.stackexchange.com/users/1542/jclozano
Possible Duplicate:  Need Help in Starting to Learn Guitars?     What's the best way to start learning and progress at guitar?   Should I start with scales, basic chord progressions or simple songs?   I am asking this because I feel I am wasting a lot of time due to a lack of direction and structure in my practice sessions.
Where to start when learning guitar?
music.stackexchange.com
<guitar><learning>
music.stackexchange.com/questions/6724
music.stackexchange.com/users/2625/Michael W
There are very varied views about how to start learning the guitar. Some people recommend lessons with a teacher while others advise learning by ear and teaching yourself. Another idea is to find like-minded people and learn/play together. A good starter guitar is also recommended. There are number of things to bear in mind when you start learning the guitar. First, make sure you have a good instrument, and then get at least some form of tuition to structure your learning and resolve any difficulties you have. As well as this, you can try learning songs by ear or play with other musicians to further your development.
Make sure that you have a good instrument to start with. Try learning songs by ear. Try playing with others to further your development on your instrument. Get some form of tuition to help structure your learning and resolve any trickier problems that you have.