how does a car move? and how do the brakes affect its velocity? [duplicate]

im doing a project that requires me to understand how cars move. from what I understand , its the friction that is creates in the tires that enables the tire to rotate, which then push the car forward. the velocity of the car also depends how much torque is generated by the axle that is connected to the wheel. what I don't understand is what do the brakes(drum or disk) do to the wheel that allow it to decrease its velocity. I know that when the brake pedal is pressed , it created friction within the tire to slow it down, but there is cases were the car still moves despite that the tires stop rotating. for sake of simplicity, im ignoring heat generated by the friction between the brake pads and wheel drum/disk, also neglecting air resistance.

at t=0, car is inputted with a certain v velocity. what I have to do is find the distance and time traveled, but I would also like to graph the rate at which the car deaccelerates depending on what type of brake it is used.

is there any good sources I can use to find to help me solve this? or could anyone describe what's going on in detail? ill clarify more if this doesn't make sense.

EDIT: the websites provided by the comments only focus on the first part of my question(which was very helpful thank you), but the second part still is not answered. the problem I have is understanding what does the brake due to wheel that allow it to deaccelerate(the whole car). since the torque created by the friction between the wheel and the surface is what causes it to move, do the brakes decrease the amount of friction created by the wheel and surface?