I struggled with hikes at OCS :/ But you will get better at them during OCS.
At OCS, there is an intro 3 mile hike, a 4 mile, 6 mile, and 9 mile. The 9 mile was a graduation requirement for us. I'm not sure about later companies.
I will flesh out this section in the future, but for now, I'll link my TBS hike pages here which has basically the same information, except you will not use flak jackets and armored plates at OCS (I wish I could type the emoji with the sun glasses here :) )
Hikes: