My base pay is currently $200K. This is not the highest base pay I know of. A friend just started at a certain company at a base of $225K.
I'm pretty senior (I'm about 50 years old). I've been doing this for ... a long time. In fact in some ways I think I'm underpaid (but there are other benefits, like stock, which help a lot). I'm very, very good at what I do. Why do I think I'm underpaid? Because products that I make bring in millions of dollars a year. Yeah, I know it doesn't quite work that way, but we devs control the means of production therefore we ought to share highly in the benefits. A topic for another time.
I live in the SF Bay Area; take home after 401k, taxes, health insurance, and other misc deductions runs around $9K/month. I put as much as possible into 401k, which I advise everyone reading this to do. I own a home, purchased a decade ago, which costs me maybe $3K a month (it's hard to estimate exactly because mortgage interest is tax deductible to an extent).
My title is something like Senior Software Engineer (but titles don't matter very much). I do mobile apps. I used to do desktop apps and server stuff but about 6 years ago, mobile seemed like a very big growth market, and I was right. Right now I work for one of the big companies, but I've gotten this pay rate or close to it at startups. There's the funny thing about startups -- they need you, but they don't want to pay what you're worth so they offer stock, but the stock is usually worthless, and then at the end of the day they really need you. So it's really about knowing yourself and your worth. In my experience, sites like glassdoor do not have accurate salary information for the top end. They are probably ok for average jobs, but at my level, they are completely off. The way you'll get the right info is by making friends with people like me and buying us a few beers... and on sites like this.
How long would it take to learn ... well, depends where you start. I'll assume nothing about you. Knowing all the fundamentals is really, really important -- data structures, algorithms, and at least a couple languages. I went to a top 10 university, but you could learn all of that stuff with a few books and some study.
Then pick some specialization. I happen to know a lot about graphics, I've done lots of UI, and so I focus on front-end stuff, and so I do mobile which is pretty specialized and very hot now. But there are plenty of other in-demand specializations that can serve you very well, so I'd advise picking something you enjoy, because you'll be doing it a lot. I learned mobile stacks by reading a lot (and it's all free, on the internet!), doing my own projects on the side, and once I knew enough, getting other people to pay me to learn more.
Then it'll take you anywhere from 1-10 years to practice that specialization enough to master it. Now, in programming, mastery doesn't necessarily mean what it does in say kung-fu. It means knowing enough of an API, and the available tools, to be really productive. It also means being able to prioritize work (e.g. use top down design) in order to deliver on time and with high quality/low defect rate.
If you were smart, learned fast, and didn't mess around too much, you could learn everything I know in a couple of years. If you did I'd be insanely jealous, but not really, I'd actually be very impressed and respectful, and I would want to hire you.
I am not scared of competition. I've worked with many really, really amazing and smart people over the years, and there is plenty of work out there. My own company is hiring, I know lots of companies are too, and it's a great time to be alive.