I generally recommend that people start learning to program with Python 2, It is a widely used general-purpose, high-level programming language that is relatively simple but very powerful..
You can look at these Python tutorials:
You can download Python at
The main tip is to stop using the term "code" if you mean you want to learn computer programming. It's easy to just write code if you don't care if the program accomplishes anything.
Try going to code.org. It is a great website and it is where I learned. Also, if you own an iPad you can go the App Store and get the "Swift Playgrounds" app by apple. SWIFT PLAYGROUNDS IS NOT ON iPHONE or iPOD.
Read and study, the practice what you have learned, and repeat again and again until you learn something!
It depends what you want to do and what language to use. I recommend Python for beginners.