The Torah only prohibited Melachot (forbidden labor) on Shabbat done in a direct, active fashion. For example, the act of Borer (sorting) or Kotev (writing) is itself a violation of Shabbat. However, Melachot achieved by indirect causes are known as "Gerama" and are not prohibited by the Torah. For example, The Torah prohibition of Mechabeh (extinguishing a fire) applies only to an act where a person directly poured water on a fire. However, it is permitted to extinguish with Gerama, whereby a person set up bottles of water in the path of the blaze, which would burst when the fire reaches them and extinguish it.
The Rishon Lesion, Hacham Yishak Yosef, asked why then is Bishul (cooking) prohibited on Shabbat. All a person did was put a pot of food on the fire; it is the fire which cooks the food by itself over time. A similar question could be raised regarding the Melacha of Zorea (planting). The act of putting the seed in the ground is only a cause for the eventual germination of the seed. Why then is it considered a Melacha?
Hacham Yishak answered that Gerama is only exempt when there is a direct way to accomplish the Melacha and yet a person did it indirectly. However, in cases like cooking and planting, the only way to accomplish the Melacha is through Gerama. Therefore, that becomes the halachic definition of the Melacha which the Torah prohibited.
This is analogous to the famous insight of the Hatam Sofer (R. Moshe Sofer, 1762-1839, Hungary) that any case in which Gerama becomes the standard way to perform the Melacha becomes prohibited. For example, the special electric Shabbat wheel chair developed in Israel operates on a Gerama mechanism. According to the Hatam Sofer, since it was designed to operate in that way, it no longer has the lenient status of Gerama.
The leniency of performing a Melacha with Gerama applies only to activities which also have a direct means of achieving the result.