We usually think about friction as a force that opposes motion, but under some circumstances it can be the force responsible for making an object accelerate. For example, consider hauling a log in the back of a flatbed truck. If there were no friction between the log and the truck, then when the truck accelerates the log would have no force acting on it to make it accelerate also, so it would just stay at rest and the truck would 'drive out from under it'! However, in reality there is friction between the log and the truck and so, providing the log does not slip, we rely on the static frictional force to make the log accelerate at the same rate as the truck.