Work occurs when

an applied force results in movement of an object in the same direction as the applied force.
an object is subjected to balanced forces resulting in movement of the object.
the energy present is the result of the force acting on the object.
the movement of the object was caused by a force and is in the opposite direction of the force.