Where is (mechanical) energy conserved? I'm reading "The Mechanical Universe" (Frautschi et al.) to brush up my understanding of physics.  So far, I can solve all the exercises and I have no problems with the mathematical parts.  But, being about half way through the book, I have the impression that I don't really "get" some basic concepts.
Specifically, in chapter 10 where they introduce energy, they talk about Galileo's experiment with inclined planes and a rolling ball:

Now that we have a definition of work, let's go back and follow energy conservation through the various stages of Galileo's experiment.  First, Galileo lifts the ball a height $h$, performing work on it by applying a force to balance the preexisting force of gravity.  We say that work is done by the force that Galileo applies, or alternatively that work is done against the force of gravity.  In any case overall energy is conserved; the work represents a transfer from the world outside the ball (namely, from Galileo) to the ball.
Since there is no net force, the ball is displaced without accelerating; thus all the work goes into the potential rather than kinetic energy: $W = U = mgh.$  Next Galileo releases the ball, and acting now solely under the preexisting force of gravity, it rolls down the incline.  During this stage gravity does work on the ball.  Again overall energy is conserved, the work representing a transfer from potential to kinetic energy.  Finally, when the ball rolls back up an incline to the original height, energy is still conserved.  Here work is done against gravity; it represents a transfer back from kinetic to potential energy.

Some pages later, they write:

But in physics the word work is used more precisely, to describe an energy transfer from one thing to another carried out by a force acting over distance.

A "thing", OK...  And then:

If we do no work that transfers energy into our system, the total energy of the system, potential plus kinetic, is conserved.

I guess my confusion here is what "the system" is.  In the first quote they talk about a transfer "from the world outside the ball to the ball", so the "system" here is the ball, isn't it?  But if Galileo belongs to the would outside the ball (system) and thus transfers energy to it, why isn't the Earth considered to belong to the world outside the ball?  Shouldn't gravity transfer energy to the ball or away from the ball?  Instead, in this case they say that gravity does work on the ball, but energy is conserved.  Is the energy within the ball conserved?  Or are we talking about the "ball-Earth system"?  Who decides when energy is transfered to a "thing" and when it is only transfered within a system?
 A: You have to be aware that "energy" is just an abstract concept that helps us understand and solve some problems in an easier way. Do not think of energy in terms of effort we (humans) do to perform some "work". These are related, but thinking in that terms will probably lead to dead ends.

I guess my confusion here is what "the system" is.

The system is whatever you define it to be.
The "work in physics" is best understood via the work-energy theorem $\Delta K = W$. You can read this as "net work done on an object equals change in kinetic energy". The definition of "system" is important in the context of internal and external forces, i.e. the forces that act within the system (internal) and the forces that are exerted by the outside world (external). Note that both internal and external forces can change system kinetic energy. If this is counterintuitive, just think of explosions: before explosion bombs are initially at rest with zero kinetic energy; after explosion there are many fragments with finite (positive) kinetic energy. Hence, internal forces from within the bomb produced (positive) change in kinetic energy $\Delta K$, i.e. internal forces did positive work. On the other hand, only external forces can change system momentum.

In the first quote they talk about a transfer "from the world outside the ball to the ball", so the "system" here is the ball, isn't it?

Correct, you can say the system is the ball.

But if Galileo belongs to the would outside the ball (system) and thus transfers energy to it, why isn't the Earth considered to belong to the world outside the ball? Shouldn't gravity transfer energy to the ball or away from the ball?

Gravitational force does work on the ball. As the ball moves away from the Earth the gravitational force does negative work and vice-versa. This mechanism is abstracted via concept of gravitational potential energy. Remember the extension of the work-energy theorem
$$\Delta K + \Delta U_g = W_\text{other}$$
where $W_\text{other}$ is work done by forces other than the gravitational force. As objects move away from each other, the gravitational potential energy increases $\Delta U_g > 0$, and if no external work is being done $W_\text{other} = 0$ then kinetic energy of both objects decreases $\Delta K < 0$.
Gravitational potential energy is by definition
$$U_g = -G \frac{m_1 m_2}{r}$$
The same equation applies to both objects involved. This means that you need to specify both objects, and in the context of gravitational potential energy they form a system. This does not mean that you cannot treat the ball as a system separate to Earth, it only means that gravitational potential energy is a shared quantity between two objects.

Instead, in this case they say that gravity does work on the ball, but energy is conserved. Is the energy within the ball conserved? Or are we talking about the "ball-Earth system"?

Energy is always conserved. This is one of the fundamental laws, and no experiment conducted so far has proved it wrong
$$\Delta K + \Delta U + \Delta U_\text{int} = 0$$
In a given process, the kinetic energy, potential energy, and internal energy of a system may all change. But sum of these changes is always zero. You can treat the ball as a separate system, the same principle applies.

Who decides when energy is transferred to a "thing" and when it is only transferred within a system?

As I have already mentioned, internal forces can change object's kinetic energy. Remember explosions in the context of conservation of energy. If you say the bomb is a system, then after the explosion the bomb fragments still make the same system. Internal energy from within the bomb is converted to kinetic energy of fragments, but conservation of energy still holds
$$\Delta K + \Delta U_\text{int} = 0$$
In this example, energy has been transferred from within the system from internal energy to kinetic energy.
A: 
Where is (mechanical) energy conserved?

Mechanical energy is conserved if, for the system,
$$\Delta KE+\Delta PE=0$$
The equation only applies when no net external force is applied to the "system". The system can defined in any way. For Galileo's experiments let's first define the system as the combination of the ball and the earth (ball-earth system) and then revisit the experiments defining only the ball as the system.
Ball-Earth System:
For the lifting experiment the ball begins at rest on the ground and ends at rest at the height $h$. Since the ball begins and ends at rest, $\Delta KE=0$. But $\Delta PE=+mgh$. Mechanical energy of the system is not conserved. That's because Galileo, who lifts the ball, is a net external force acting on the system.
When Galileo releases the ball from the height $h$, the only force acting on the ball is gravity, which is internal to the ball-earth system. It does positive work that increases the KE of the ball. That increase in KE exactly equals the decrease in PE, and therefore $\Delta KE+\Delta PE=0$ and mechanical energy is conserved. It is conserved because no net external force is acting upon the system.
Ball Only System:
Now let's revisit the lifting experiment but we will now consider only the ball to be the system. There are now two external forces acting on the ball being lifted, Galileo and gravity. Galileo does positive work (since his force is in the same direction as the displacement of the ball) equal to $+mgh$ on the ball while at the same time gravity does an equal amount of negative work (since its force is equal and opposite to Galileo's) of $-mgh$, for a net force and net work of zero and $\Delta KE=0$.
Now here's the tricky part. You may ask, since the net external force acting on the system (ball) is zero, shouldn't mechanical energy be conserved? And if that's the case, isn't there an increase in GPE of the ball?
The answer is mechanical energy is conserved, because the ball, by itself, does not possess GPE. Potential energy is the energy of position of an object relative to another object. That makes GPE (as well as all forms of potential energy) a system property, in this case, a property of the ball-earth system. Since we have not included the earth as part of our defined "system" we cannot speak of a change in GPE. Although it is common to speak of the potential energy of an object, in reality an object alone does not "possess" PE. All forms of PE are a system property. In effect, the negative work done by gravity on the ball stores the energy given the ball by Galileo in a different "system", the ball-earth system.
Now let's define the ball as the system for the dropping experiment. In this case the only external force acting on the ball is gravity which constitutes a net external force acting on the system. Therefore, since there is an increase in KE but no change in GPE (once again, the ball alone does not possess GPE) mechanical energy is not conserved.
Hope this helps.
A: The system is whatever you define it to be, and everything external to the system is the surroundings. Work (and heat) is energy transferred between the system and its surroundings; there is no work (heat) internal to the system.  The energy within the system is the internal energy of the system.  (In mechanical engineering, the "heat" within a system, is an incorrect use of the term heat. The correct term is the "internal energy" in the system.)
The mechanics branch of physics primarily addresses work for a point particle, or a rigid body, for which there is no change in the internal energy (temperature, phase, chemical composition, etc.) of the body.  Here, work done by a force is defined as $\int_{r_1}^{r_2} \vec F \cdot d \vec  r$ where $\vec F$ is the force and $\vec r$ is the displacement.  The change in kinetic energy is equal to the net work done by all forces on the body.
Thermodynamics considers the change in internal energy of a system, and work in thermodynamics is a much broader concept than work in mechanics. In thermodynamics work is defined as "energy transferred without mass transfer across the boundary of a system because of an intensive property difference other than temperature between the system and its surroundings". Using this definition, electrical current flowing in/out of a system is work. (Heat is defined as energy transferred without mass transfer across the boundary of a system solely because of a difference in temperature between the system and it surroundings. Mass transfer is addressed using enthalpy.) See a good thermodynamics text such as one by Obert, or by Sonntag and Van Wylen, and note particularly the work in the first law of thermodynamics applied to an open system. (An open system is one where mass can flow into/out of the system.)
Even for a body that has a change in internal energy, the mechanics definition of work is accurate when applied to the center of mass of the system.
To distinguish between these two definitions of work, some use the name pseudowork for the work defined in mechanics and reserve work to mean work as defined in thermodynamics. You can find discussions of this approach on the web under "pseudowork" and/or articles written by Sherwood.
