The truck is accelerated forward and there is a box inside the truck.
According to the law of inertia, when the truck will move forward, the box will move backward.
When the force due to the acceleration of the truck exceeds the frictional force on the box, then the box will slide in the backward direction.