Given 2 situations.
Situation 1:
Heat is a form of energy. Heat is transferred from a hot body to a cold body. Thus, in this situation, energy in the form of heat is being transferred from the cup to the spoon.
Situation 2:
When a spring is stretched, the energy will be stored in the spring in the form of the spring potential energy. When the spring is released, the energy is transferred to the ball in the form of kinetic energy. Due to this kinetic energy, the ball starts to move.
Thus, in both situations, the energy is transferred.