When there is a force applied to the object it causes the object to move and work is done by the force. If the object is not moved by the applied force then no work is done.
When there is a force applied to the object it causes the object to move and work is done by the force. If the object is not moved by the applied force then no work is done.