The rear wheel is driven by the cyclist, pushing the ground backward. By Newton's third law, the ground exerts a forward frictional force on the rear wheel. The front wheel is passive and is pushed forward by the bicycle's frame; it tends to slip forward, so the ground exerts a backward frictional force on it.