Some places have formal catchment areas which can be odd shapes, so you could live perhaps half a mile from a school but not be in the catchment whereas another child might live a mile from the school but be in catchment. Even they live further away they would have priority.
Other places - like London - don't have catchments. They have admissions categories - normally looked-after children, children with medical or other needs who have the school specified in the relevant documents, siblings, distance from school gate.
Faith schools often have categories for children whose parents attend x church, then children who attend other churches, then children of other faiths who attend a place of worship, then distance (and various combos of those categories for siblings).
The distance can alter year on year. Sometimes, if a school has taken a bulge class in the preceding years there can be no places for anyone except siblings (and sometimes there are even more siblings than there are places)- ditto in some very high birth rate years. A few sets of twins can also reduce the distance, as can new housing in the area. It's all a bit of a lottery even if you live very close.
In London you can apply across boroughs and iirc, it is based on distance rather than having to live in the borough.
Check how the distance is measured - my borough is 'as the crow flies', one of the neighbouring ones is 'shortest walking route'. There are schools that are close to us by straight line but the walking route is so long that we'd never qualify for a place, whereas others that are further away by straight line, we would.