Programmable devices exist for more than a hundred years, but the development of computer programs as we know them today started in the 1950s. Right now software development is one of the most important parts of today's economy. It should be noted that the term "software" is a bit broader than "computer program", and basically refers to those parts of a computer that you can't kick if something goes wrong.
Since about five years it is also possible in Europe and the United States to obtain patent protection on software-related inventions. However, due to difficulties with assessing novelty of such inventions, a relatively large number of patents have been granted in this field that claim known or obvious inventions.