Then only the component of the force that's parallel to the displacement is used to calculate the work. The component of force that's perpendicular to the displacement doesn't move through any distance at all, so its contribution to the total work is zero.
When a force does not act parallel to the displacement, only the component of the force that is parallel to the displacement contributes to the work done. If the force is perpendicular to the displacement, no work is done at all. This means that the angle between the force and the motion is crucial in determining how much work is accomplished by that force.
;