I don't know what your background is, so I'll start at the very beginning and maybe some of it will be obvious and you'll skip over it.
School is a good, safe route. If you have a chance to take an AP Computer Science course in high school, then do so, and other than that, you can't go wrong with math, and good writing skills will eventually come in handy so don't neglect English (though some people, like me, do neglect English, and mostly turn out fine, at the cost of having to learn how to write technical documents clearly years later). From there, go to a college with a good Computer Science program. This is a popular topic for colleges, so it should be easy to determine which colleges that seem the most interesting also could teach you Computer Science well. A B.S. in Computer Science is a good start and will give you a lot of direction, though it is usually not sufficient for a career in CS on its own, nor is it always necessary. While in college, internships are a good way to get skills and practice in a real working environment.
There is also a fair amount of self-driven study available, if you are the kind of person who likes that.
The sooner you start learning the basics, the better, so if you don't already know how to code, I'd recommend picking it up. codeacademy.com is a well-known starting place which covers several possible languages. You could also try a number of language-specific tutorials across the Web, like the Python ones here: http://docs.python-guide.org/en/latest/intro/learning/ or the Web ones here: https://developer.mozilla.org/en-US/docs/Learn
As a side note, you'll quickly find that there are a lot of different programming languages, tools, and so on out there, all with different specialties. A fair amount of programming knowledge is general, so if you learn any one, it will be easier to learn your next one, and after you have learned a few, it will be fairly easy to pick up a new specialty. Because of this, I'd recommend starting with one that particularly interests you, because then you'll have a more enjoyable time learning it. For some categories and the languages I'd recommend:
Android apps - Java or Kotlin
iOS apps - Objective-C or Swift
Server-side (for Web development or just text-based programs): Python
Weird math-y programs: Haskell
Embedded systems (microprocessors): C, or the Arduino language (for Arduino chips in particular)
Here it seems worth noting, since it's often unclear, programming is the actual act of writing instructions for a computer. Computer science is the study of ways to solve problems and approaches to use when coming up with the instructions. Computer science can be an obscure branch of math if you want to study that part of it, but most people who get an undergraduate degree in CS are really learning a little bit of CS, and a lot more programming and software engineering (which is programming plus working with other people, be they other programmers or users, and making sure your programs will keep working). For most people, the best way do what they mean when they say they want to learn computer science is to learn to program, and then as they want to write more and more complicated programs, they'll start learning specific computer science topics as well.
So, go through some tutorials until you have small working programs, then start to challenge yourself, coming up with things you'd like to see and then making them. If you're able to get any into a nice enough state you'd want to show others, and you are willing to share the source code, you can put it in Github and then can add that to a resume, showing prospective employers that you have real coding experience. I also found, with my own projects on my own resume, that it meant there were a few things I could talk really in-depth about, so when an interviewer asked about a piece of one of my projects that interested them, I had a lot to say.
Also, once you have learned the basics of one or more languages, you might want to try improving an Open Source program. Open Source Software is software where the source code is freely available to download and modify. Many large and well-known programs, like Firefox and Linux, are open source, and many other programs are based on open source cores, like Google Chrome (based on Chromium) and macOS (based on FreeBSD). Most projects make it fairly easy to find their source code, along with their issue tracker (where they list the bugs they know about and the improvements they want to make) and some kind of community mailing lists or chatrooms. If you can find a project you'd like to contribute to, find out what the guides are for new programmers, then start picking out small issues they'd like fixed and submit them as changes! This is another great way to build a resume, and get more real-life software experience, while actively making some program that other people use better, which can feel very rewarding.
Two possibilities I'm particularly aware of, depending on your position in school, are Google's CSSI and the Google Summer of Code. In CSSI, rising college freshmen with potentially no programming experience who get into the program come to a Google office for three weeks where they learn to program and make Web apps. In the Google Summer of Code, college students who apply for each summer get paid a stipend to work on an Open Source program. This one requires some more starting experience, but once you have it, it's a great way to get more if you get in.
I know this is a lot. Feel free to ask more about the parts that are actually relevant to you!