Practice. Practice, practice, practice. The most important thing to realize is that math isn't just a body of knowledge, but also the skill of applying that knowledge. Example: Memorizing a bunch of trig identities will not let you integrate crazy trigonometric functions. You need to be able to figure out which identities you ought to apply to push your crazy function into an integrable form. The identities you can look up from a book when you need them. The important skill is applying the identities you have.
This ability, to see the direction you need to go from the pieces that you have and the goal you want to achieve, is the most transferable skill that mathematics will give you. And you can only get it from practice. Get actual textbooks, with practice problems. Preferably, get the teacher's edition, or one with the answer to odd-numbered problems in the back so you can check your work. And when you make a mistake, don't just correct it, go back and figure out why you were wrong and why the answer is correct, because that's often one of the most instructive activities you can do.
You probably already know that any given level of math builds on knowledge and concepts from previous levels. Depending on the speed of progression, it's often necessary not just to know the preceding knowledge, but to master it. The lower-level stuff has to be downright trivial if you want to focus on higher-level stuff. It's simply not possible to do, e.g., line integrals in the complex plane if you have to stumble through basic algebraic manipulations like canceling variables while you're doing it[1]. The converse of this, is that you often master important math concepts by using them as the foundation for something more abstract, because only then do you see why they were so important.
Anyways, enough generalities, time for specific subjects. Geometry isn't very important, but trigonometry becomes important, especially because it's related to exponents which are super-critical. Learn trig. Then, learn linear algebra (matrix maths). Then, find a course or book on discrete mathematics, which usually means intro-level number theory, graph theory, and combinatorics. Calculus is worth picking up at some point. It's not as important to a programmer as to a physicist or engineer, but it is foundational to several other areas, and shows up in the damndest places. Simple single-variable calculus is probably sufficient, and focus on what an integral represents rather than how to compute one. After that, the two interesting paths are analysis (and topology), and algebra.
[1] It's a lot like learning a new language in a different alphabet, which is something I'm doing right now. It's really hard to deal with important concepts like characterization and tone when you can barely fit three letters in your head at the same time, much less a whole word (that you have to look up), much less an entire idea.