Here's a link to a good explanation of how that works:

https://www.rifleshootermag.com/editorial/hitting-a-high-or-low-angle-shot/83768