What is the working principle of anti-explosion fuel tanks?
Modern military fuel tanks use the same basic technology to seal the tank after a puncture as WW2 aircraft did, which is the use of a laminated rubber-textile material, which tends to retain its form after being torn. The main difference between modern tank liners and WW2 liners is that the modern liners use more sophisticated materials so they can achieve the same benefit using a much thinner liner (hence less weight).

Bullets hitting a tank do not cause "detonation" unless they generate a spark and the fuel-air mixture in the tank is in ignition range. Also, most aircraft explosions are not detonations, they are deflagarations. The liner does nothing to prevent this. The main functions of the liner are to prevent fuel from leaking out of a punctured tank and to maintain the integrity of the tank in a low-altitude mishap or crash. The main test for a liner is the "drop test" in which the liner is filled with fuel and dropped from a height of about 50 feet.

The advantage of pressurizing a tank with air (inerting) is that it increases the critical temperature of an explosive mixture. If the critical temperature of the mixture is above the ambient temperature, then the tank will not explode spontaneously when sparked. A modern variation on this is called "nitrogen inerting". The idea with that is to pressurize the tank with nitrogen. This makes the tank spark proof.

Note that inerting technologies do not prevent a fuel tank from blowing up if an aircraft is hit with ordnance. The reason for this is that typically the way an aircraft blows up is that damage from the ordnance starts a fire. The fire then rapidly evolves fuel-laden gases into open compartments of the aircraft. As soon as these gases reach the ignition mixture, the fire deflagarates the mixture, causing an explosion. Inerting does little to prevent this.

Inerting is very useful, however, because it can prevent a plane blowing up due to lightning or problems with electrical wiring or static electicity buildup.