Answer
The internal force of the brakes stops the wheel from spinning, freezing it relative to the car. The stopped wheel contacts the road, and it is the external backward frictional force exerted by the road on the tires that stops the car.
If a car were sailing through deep space, applying the brakes would have no effect whatsoever.