Work is only done when a force acts on an object and causes it to move. If the object does not move, then no work is done, even if a force is applied.