You have to pan the camera at the speed the car is moving. The background is blurred but your lens follows the movement of the car and keeps it sharp (relatively). It's not super easy to do, but with practice you can get quite good at it. I suspect these were made by a camera hooked onto another vehicle which was following the subject.