As you might be thinking, this is an extremely broad definition. Such a definition is necessary because programming encompasses everything from the design of word processing software to the creation of the player that streams YouTube videos. On first glance, a desktop word processor and an online video player seem similar. They both respond to mouse and keyboard input; they both display feedback of user actions; they both are capable of loading and displaying stored files. But how do they differ with respect to our definition of programming? At the programming level, they are completely different. Desktop word processors like Microsoft Word or Open Office are programed using the C\C++ family of languages. The instructions contained in desktop word processors are generally executed by the central processing unit (CPU) of the user's computer. That is, the instructions drive an actual physical device using commands that alter the flow of electrons among millions of microscopic circuits. The instructions at the level of the CPU also interact with other circuits inside the computer to provide memory access, hard disk storage, graphic display processing, and more.
The YouTube player is coded in the Adobe Actionscript language. It is executed by a virtual machine known as the Adobe Flash Player. A virtual machine, also known as an interpreter, is software rather than actual hardware, yet it mimics the actions of the physical CPU by interpreting and executing instructions (known as bytecode) coded by the authors of the YouTube player.
While the YouTube player runs inside the Flash player virtual machine, the Flash Player itself is written in C\C++. This means that the Flash Player is sending actual instructions to the physical CPU in order to carry out the requested virtual instructions of the YouTube Player. The creation of an intermediate step between what the end user sees and what the actual CPU interprets is a common modern programming technique known as virtualization.
You may be wondering why one would go to all the trouble of virtualization when code could be written that instructs the processor directly. The reason is that different computers run different operating systems and sometimes even different processor hardware known as the processor architecture. An operating system--like Windows, Mac OS X, or Linux--is an aggregate of software that serves as the communication interface between the user and all of the hardware of the computer including the keyboard, mouse, monitor, CPU, etc. This means one would have to write different (albiet mostly similar) code to run YouTube for Windows, Mac, or Linux. On the other hand, if a virtual machine like the Flash Player defines a universal set of instructions and handles the translation to CPU instructions automatically, one needs to design YouTube only once in order for it to run on all operating systems. This is known in programming as portability. Moreover, the interpretation of commands before their execution in a virtual machine provides security by restricting certain possibly malicious commands. These two reasons--portability and security--make virtual machines like the Flash Player ideal platforms for the internet. On the other hand, since the additional layer of processing used by a virtual machine necessarily implies that commands are executed slightly slower than commands executed directly by the CPU, extremely large programs like word processors are better suited to be CPU-interpreted also known as native applications.