In the UK and Ireland (Australia too), there are a few different ways to place a bet.
If betting with a bookmaker you can take the current odds or the Starting Price (SP). If you take the current odds, you're locked in to that price, regardless of which way the price moves. If you're taking the current price, you need to be quite sure the SP is likely to be shorter. The SP, as the name implies, is basically the price of the horse when the race starts.
One can also place a bet on the Tote (totaliser), which is common in many parts of the world and often government owned/run. For example, Hong Kong, the jurisdiction with the biggest gambling turnover on horse racing, only legally allows bets on the Tote. This is a form of parimutuel betting. All bets go into a pool, the winning dividend is the amount available in the pool, divided by the total number of bets on the winner (less the operator's commission). Therefore, the price will fluctuate with the number of bets placed and the monetary volume.
https://en.wikipedia.org/wiki/Parimutuel_betting