Please click through the source link above to read the entire discussion of pump shut off sensors. Below is only a snippet of the entire conversation.
When fueling at a gas station, how does the pump know that the tank is filled ?
The gas flowing through the nozzle passes by some venturi holes, the flow of gas creates venturi vacuum in a diaphragm. About a 1/2 inch up from the end of the nozzle there is a small hole called a sensing port which is also connected by a tube to the diaphragm. The sensing port bleeds off the vacuum to atmosphere while you are filling. When your tank is full fuel starts to rush up the filler tube which closes off the sensing port which allows the vacuum in build up and move the diaphram to shut off fuel flow.
Sometimes you here people complain that the pump keeps shutting off, that can be caused by two things. If the end of the pump nozzle is damaged the fuel won’t flow out smoothly and may splash around in the filler neck and cover the sensing port long enough to move the diaphragm. Another common cause is that the cars fuel vent tube, rollover valve, or evap canister is restricted which allows pressure to build up in the tank and causes fuel to rush back up the filler neck and cover the sensor port shutting off the pump.