What Is a “Fork Choice Rule” and How Does It Prevent the Nothing-at-Stake Problem?
A fork choice rule is an algorithm that nodes use to determine which chain is the canonical (correct) one when a fork occurs. Ethereum PoS uses the LMD-GHOST rule, which favors the chain with the heaviest weight of attestations (i.e. the chain supported by the most staked ETH).
By explicitly defining the "correct" chain and penalizing validators who attest to any other, the rule forces rational validators to commit to one chain, thus solving the nothing-at-stake problem.