Heat pits are specialised organs (rows of pits along the lips in pythons and boas) that sense infrared "heat", letting a snake detect warm-blooded prey in the dark.
They're essentially built-in thermal vision. It's a normal, fascinating feature of many constrictors — not a defect or injury.