Please see the diagram. Friction, f, exerted on the tires by the road produces a torque around a horizontal axis passing through the car’s CM (marked with an "x"). In the top diagram, the car accelerates forward to the right. The friction force points forward and tends to rotates the car counterclockwise around the CM, bringing the front of the car upward. When braking, the friction force points toward the back, the car rotates clockwise, and the front of the car rotates downward.