First pick a language you want to learn. There's alot of different ways to write code, but C++ is the most known to people. Assembly is also good to know, because C++ and assembly can combine. Code is a new language like spanish or english and can take a LONG time before you can memorize it and be able to write full worth-while codes.
You are also going to need some money because most good compilers cost money and being cheap is NOT something you want to do..
Go to a public library or just order some books on Assemby, C++ and other such things like general electronics. You will want to know EVERYTHING about electronics. If you dont know what components like a resistor or a transistor are you should learn things like that BEFORE you learn a language.
The thing id suggest is READ.Read everything you can find. Get a notebook at take notes (Im not kidding...)
Learning a language of a computer is not an easy task. Its not something anyone can just do with no knowledge.
And, LOL at treemty. "Learn how to write code." What the hell does that tell him?!