When you press the sprint button during a race your racehorse will begin to sprint faster. As your horse sprints, it will drain its sprint energy, shown in the bar along the top of the screen. Once this bar empties your horse will no longer be able to sprint.
Over time your racehorse’s sprint energy will slowly refill. However, if you keep your racehorse within the pack position line their sprint energy will recharge the fastest.