How do they block a state like this? Is there a directory where ip addresses can be looked up to see if they fall within these geographic boundaries? What about computers belonging to people visiting the state?
It’s based on IP addresses, not computers. There are “IP Geolocation” services that aggregate many different databases to try to guess where an IP address has be allocated physically. See https://whatismyipaddress.com/geolocation