There are two types. Both work basically the same way. In a regular BOV, there is a spring that keeps the valve shut. There is equalibrium in pressure between the top, which seems vaccum or boost though vaccum lines, and the bottom which sees boost under boost. When you let off the throttle, the top no longer sees boost, but the bottom does, cause it to force the valve up, against the will of the spring.
The second type, usually used in high boost applications has the top and the bottom linked together. This creates and automtatic equalibrium. And then under boost, the vacuum hose on top gets more boost, actually forcing the valve down. Since the top and bottom sections are connected, it's harder for the valve to "blow off". That's why this is far less common and only used in high boost applications. And a normal bov will usually do fine with the right spring or adjustment in high boost, making this type fairly rare and pretty much obsolete.
But, the main idea is equalibrium in pressure. When the vaccum lines see the same amount of boost as the intercoooler pipes, the spring in the BOV keeps it shut. When the vaccum lines stop seeing boost, when there is still boost in the piping, the boost forces up the spring, opening up the valve.
Btw, valve and diaphram are used as the same term as they are the same principle. The valve is the actual piston, the diaphram puts pressure on the valve, in conjunction with the spring.