Program (machine)
A program is a set of instructions used to control the behavior of a machine. Examples of such programs include:

The sequence of cards used by a Jacquard loom to produce a given pattern within weaved cloth. Invented in 1801, it used holes in punched cards to represent sewing loom arm movements in order to generate decorative patterns automatically.
A computer program (software) is a list of instructions to be executed by a computer.
Barrels, punched cards and music rolls encoding music to be played by player pianos, fairground organs, barrel organs and music boxes.
A music sequencer is a programmable musical instrument. It was the earliest type of programmable machine. The first music sequencer was an automated flute player invented by the Persian Banu Musa brothers, described in their Book of Ingenious Devices, in the 9th century. In 1206, the Muslim inventor Al-Jazari (in the Artuqid Sultnate) invented programmable automata, which incorporated the first programmable drum machine.

The execution of a program is a series of actions following the instructions it contains. Each instruction produces effects that alter the state of the machine according to its predefined meaning.

While some machines are called programmable, for example a programmable thermostat or a musical synthesizer, they are in fact just devices which allow their users to select among a fixed set of a variety of options, rather than being controlled by programs written in a language (be it textual, visual or otherwise).

References

Computing terminology
Arab inventions
Iranian inventions
Turkish inventions