I believe what you're looking for is TERCOM.
TERrain COntour Matching, is the use of typically an onboard radar system to sense the terrain around a missile, and comparing it with a map stored in some memory device on the missile.
Usage of TERCOM requires good intelligence capabilities and specifically the ability to create accurate maps of said terrain before a mission. Such maps are typically created and refreshed periodically during peacetime and then ready for immediate use in wartime.
Modern munitions also utilize jam-resistant GPS to periodically calibrate the INS and attain excellent accuracy of meters regardless of flight range.
GPS signals are inherently low power (significant attenuation over distance between satellites and receiver), so jamming them with white noise on GPS frequencies is very easy. So it is key to make an anti-jam system and not a commercial receiver.
One way to anti-jam a GPS jammer is software-defined ratio which allows utilizing advanced variable-reception-pattern algorithms that can physically block jammers and enhance real signals. They're not cheap though.
One more method that is quite common for standoff munitions is optical guidance. Using a method similar to TERCOM, the user uploads an image of the target, and the missile attempts to identify the target based on that image in its terminal phase.