I suggest picking up a book on the subject, like "Code Complete" (at Amazon or wherever books are sold. Pretty sure it's at the library if you'd rather read it for free -- but it'll do better as a reference book on your desk for a few years). Use it and start practicing with personal projects hosted out of Github.
I also suggest using a daily practice like a code kata: http://codekata.com/