There are very specific policies on this, but from memory it would take 2-3 semesters of failed APFT (potentially one being in the summer).
Historically, if you exit CBT without a passing APFT your assigned team leader (yearling) will be responsible to get your scores up Fall semester, etc. Most cadets are able to improve and pass with a coach. And for some it resurfaces as upperclassmen.
There would also be increasing attention each failed APFT, along with "conditions" and restrictions. And improvement plans.
It can impact leave, and for sure would impact summer training opportunities if not addressed.
In the last 3-4 years there has been increasing rigor to the standards, with APFT being much more tightly managed.
So not something to be afraid of at CBT, but definitely something you will want to get ahead of. You'll be accountable for APFT performance for the next several years, it's a big impact on your class rank early on, and even factors into leadership evals, etc.
Start cranking those sit-ups!