There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.
http://www.w3schools.com/css/css_howto.asp
When I'm developing a style sheet, I like to put the styling into internal files inside the HTML document. It helps avoid browser caching which is to be avoided during development.
Here's an example from another question where we use PHP to prepare HTML elements, including internal style sheets.
Open in new window