How does inertia affect the motion of an object?