Microphones work by sensing minute changes in air pressure.
A pressure operated microphone is essentially a sensitive barometer and reacts only to changes in pressure irrespective of the direction of the sound source. It comprises a sealed box with air inside and a thin diaphragm that deflects for small pressure changes. Some form of transducer element converts the diaphragm movement to a varying electrical current. In practice the box has to have a minute vent to allow for gradual changes in the atmospheric reference. Positive sound pressure from any direction will squeeze the diaphragm inwards so these microphones are inherently Omnidirectional.
A pressure gradient microphone has a diaphragm which is open on both sides, and detects the difference in pressure between one side of a diaphragm and the other. High pressure in a sound wave at one side will push the diaphragm while the accompanying lower pressure trough will assist by "pulling" the other face. Reversing the direction of the sound will displace the diaphragm just as easily and give the same output but with opposite polarity. Sound at 90° acts equally on both sides of the diaphagm and creates no pressure difference across it at all. Thus pure pressure gradient microphones are inherently Bi-directional (figure-of-eight).