Fetchlands (like Windswept Heath or Polluted Delta) are activated abilities with no timing restrictions beyond needing priority. Under CR 116.1, any player may activate an activated ability whenever they have priority, including in response to a spell or ability on the stack.
When you activate the fetchland in response to a spell that would make you lose life, the fetchland ability goes on top of the stack and resolves first (CR 608.2). You pay 1 life, sacrifice the land, and search for a basic land. After that resolves, the original spell resolves and causes its life loss.
This is commonly done to ensure you get a land before a spell like Flames of the Blood Hand resolves, or simply to thin your deck before your life total drops. Note that if the original spell would reduce you to 0 life, cracking the fetchland first costs you 1 more life beforehand — which could matter in edge cases.
Concrete example: Your opponent casts Lightning Bolt targeting you (3 damage). You respond by activating your Scalding Tarn: you pay 1 life, fetch an Island, then Lightning Bolt resolves dealing 3 damage. Net result: you spent 1 life and took 3 damage in two separate events, but you successfully searched your library.
There is no rule preventing this interaction. Fetchland abilities are simply activated abilities (CR 602.1), and activating them in response to spells follows standard stack rules (CR 117.1).
Unofficial fan resource — not affiliated with or endorsed by Wizards of the Coast. Answers are AI-generated estimates grounded in the Comprehensive Rules and are not a substitute for an official judge. Verify anything match-critical.