Work done $W$ is the dot product of a force $\vec F$ and the displacement of the force $\vec s$.
$W=\vec F \cdot \vec s$
The work done is positive if the force and the displacement are in the same direction and negative if they are in opposite directions.
You watch a lorry accelerating.
A box on the back of a lorry also accelerates and the kinetic energy of the box increases.
The only horizontal force on the box is friction and so it is the frictional force which is doing positive work on the box.
Ignoring air resistance, if you throw the box vertically upwards, the gravitational force on the box is downwards so the work done on the box by the gravitational force is negative and the kinetic energy of the box decreases.
Wait a little until the box starts falling and the the work done by the gravitational is then positive as the kinetic energy of the box is increasing.
When the box arrives at the place it started from just after it left your hand, the net work done by the gravitational force is zero and it has the same kinetic energy as at the start.