It depends on how you learn. Some people will recommend Coursera et al., which are great. I tried some Coursera courses, but found that I found the pace too slow and became bored quickly.
For me, reading always works the best, since I can adjust it to my pace. You could look up a curriculum (as someone else suggests) and compose a reading list from that. Also, there are some works where you really can't go wrong. Some examples:
- Structure and Interpretation of Computer Programs, Abelson and Sussman
- Algorithms, Sedgewick, Wayne
- Introduction to Automata Theory, Languages, and Computation, Hopcroft, Motwani, Ullman
Lesser known, but incredibly fun books:
- Purely Functional Data Structures, Chris Okasaki
- The Reasoned Schemer, Friedman, Byrd, Kiselyov (or a good Prolog book).
After learning the foundations, you could branch out to a subfield that interests you.
(Or as Frank Zappa has bluntly put it: “If you want to get laid, go to college. If you want an education, go to the library.”)