When we are pedaling, a torque $\tau$ is induced in the wheels of the cycle. Since the tires generally have a good traction with the road, the friction force acting on the cycle would be $f_1 = \frac{\tau}{r}$ where $r$ is the radius of the wheel. $\tau_i$ is the torque induced on the pedal by your foot.
Since, generally the pedal is connected to the back tire, the torque acts on the back tire and causes the motion. This causes the front tire to slip and hence, a friction force $f_2$ acts on the front wheel, making it rotate.

Now when you stop pedaling, there is no torque acting on the wheel and the wheel is pure rolling. $v = \omega r$ where $v$ and $\omega$ are velocity and angular velocity respectively.

When the wheels are pure rolling, the friction force acting on the bike would be $0$ and ideally, the bicycle keeps rolling forever. But generally, when we stop pedaling, the bicycle comes to a stop after going for a bit.
This is due to other dissipative forces such as friction in the bearings, resistive forces in the sprocket and rolling friction. These resistive forces acts on the cycle which brings it to a stop.

The friction force isn't the force that brings the bicycle to a stop. it is the internal resistive forces and rolling friction that brings the cycle to a stop and these forces actually slow down the wheel rather than make them spin faster.
When we apply the brakes, the wheels are forced to stop spinning while the bicycle continues to move forward. hence a friction force $f$ acts on the tires opposite to the direction of motion, thus stopping the bicycle
