DO has it in a tiny nutshell! Prize distribution is run via BHA schedules and appendixes. For example, on the Flat, Schedule (F) 9.3.4 permits for a prize distribution through six placings, Schedule (F) 9.3.2 permits for prize distribution through four placings. In NH, Grade 1 (Class 1) hurdles and chases' prize monies are distributed up to six placings under Appendixes W (c) (iv), the Class 2 Foxhunters under W (e) (iv) up to six placings, a conditional jockeys' h'cap hurdle, and a Class 3 chase, under W (d) (iv) also up to six, while a Class 5 Bumper is distributed under W (d) (ii) and is limited to four placings. At Sandown, an amateur riders h/cap hurdle is distributed under Appendix W (e) (ii) to four placings.
It's not the number of runners which determine whether you get three, four, five or six position prize money, because obviously nobody knows how many horses will take part until the day of the race. It's the type of race - its Grade or level of Class. You can pretty much assume that all Class/Grade 1, 2, and 3 will get up to six, the lower orders mostly four, while a Class 6 or 7 usually just three.
If you look at any race cards you've got, there'll be a page detailing 'Today's Race Conditions' which will explain in minute detail which Schedule or Appendix applies to each race, who gets 'ow much, as well as the what the runners have to be in terms of gender, age, etc.