Nobody is firing artillery much over 50km in combat conditions. The max range for a traditional unguided round is ~30km. Most anything over that is using a guided round with some sort of rocket booster.
There are a few experimental systems that could get out to 150km, but they are using guided rocket assisted rounds. The guided rounds use fins + GPS to reach the target.
Unguided rounds are, as other have mentioned all about math and knowing the exact location of where it was fired from. Also millimeter wave radar to determine the exact winds all the way to the target and tracking the first round to adjust the following rounds.
Latest Answers