While you can pay for certain programs to receive a certificate, there are a number of free introductory programming courses in various specializations from universities such as the University of Washington, Stanford, the University of Toronto and Vanderbilt
Sometimes, you need to recall a reference book when you’re stuck on a problem. That's GitHub. You can find more than 500 free programming books that cover more than 80 different programming languages on the popular web-based Git repository hosting service, which means that it’s frequently updated by collaborators.
If you’ve already learned the basics, and went to get into something a bit heavier -- such as exploring the theory behind coding -- take advantage of MIT’s free courseware site that includes classes such as Introduction to Computer Science and Programming, Introduction to Programming in Java and Practical Programming in C.
While there are courses you have to pay for, there are plenty of free programming courses, which are taught via video lessons, such as Programming for Entrepreneurs - HTML & CSS or Introduction to Python Programming.