Generally it takes 48 hours to recover from a hard effort. That's a long day, a hard day such as sprints or intervals, or a couple back-to-back medium days. You need recovery in between. That can be a day off or an easy day of spinning (30 minutes or so).
There's no magic time to develop true over training. So be aware of the classic symptoms - chronic fatigue, lack of desire to train, can't sleep soundly, anxiety, morning herat rate higher than normal, frequent colds, etc. It's important to back off as soon as these start to appear.
I've developed over training several times over the years running, mostlt from very high miles and too much concentrated speed work. I've recovered in a couple or three weeks when I recognized falling into the trap early. I've also pushed myself past the warning signs and it took three months and more to get back to normal.