The warm system causes the gas molecules in the surroundings to increase speed. The impact of collisions of these molecules spreads the extra energy throughout the surroundings. This thermal motion determines the temperature. But energy has a strange duality. It appears as heat but can also appear as work.
Work is the energy used to move an object against an opposing force.
Basketball's three-point jump shot is work. Remember how Michael Jordan moved his body upward against the force of gravity. His dribble was work. The compressing ball as it strikes the floor, the rebounding ball as it returns to Michael Jordan's hand, all of this is work. Energy is used to overcome gravity, to deform the shape of the air-filled ball.