The oil enters the oil filter under pressure through the holes on the perimeter of the base plate.
The "dirty" oil then passes through the filter media where it is "cleaned". It then flows to the central tube and back into the engine through the usually threaded hollow center mounting stud.
Oil Filter Flow Diagram
The only thing that holds the "spin-on" oil filter to the engine and keeps the oil from leaking is the base gasket (shown in above picture in red).
The Bypass Valve
Under ideal conditions, the bypass valve will never open. When it opens, the oil by passes the filter and goes on through to the motor, obviously unfiltered. It is a safety valve. However, in real operation, it opens often.
One example is when you start the motor when cold. The oil is thick and does not pass easily through the filtration medium, thus building up to a high pressure drop. So, the bypass valve opens to prevent oil-starvation of the motor. How long it stays open is dependent on how cold the oil is and how long it takes to get near operating temperature. When the pressure drop across the filtration medium drops below the bypass valve setting.
Another example can occur when the motor is fully warmed. At idle, the oil pressure is about 15 to 20 psi, and the pressure drop across the filter is about 1 or 2 psi. You take off towards the redline, and quickly build oil pressure. During that full-throttle acceleration the pressure drop across the filter will exceed the bypass setting, and send unfiltered oil to the motor, until the pressure across the filter has time to equalize. During a drag race, shifting through the gears, the bypass will open several times.
A third example, which you should never experience with frequent oil and filter changes, is when a filter becomes clogged. A spin-on filter can commonly hold 10 to 20 grams of trash before it becomes fully clogged. The bypass valve opening is the only way to keep the motor from becoming oil-starved if the filter becomes clogged.
According to Purolator, the Honda OEM filter bypass setting is 12 to 14 psi. WIX (NAPA Gold) builds their oil filters with a bypass setting of 8 to 11 psi, while AC Delco builds theirs to a setting of 11 to 17 psi. How much do these differences matter? I don't think anyone knows, even the engineers, and each has its own set of advantages and disadvantages.
If you do lots of racing, you're probably better off with a higher bypass setting.
If you do lots of *cold* starting, especially in the winter, or seldom change your filter, I think you're better off with a lower bypass setting. However, with few exceptions, bypass pressures for spin-on filters run in the 8 to 17 psi range, and any of them should work acceptably.
Here is a picture of the breakdown on some oil filters anatomy
As you can see, some bypass valves are built directly in the middle of the filter while a few do not have one.
Here is a cutaway of Bosch's and how each component is located in a filter.
1) Rubber seal
2) Steel baseplate
3) Anti-drainback valve
4) The bypass valve
5) Filter media
6) Filter can
Hopefully this gives you a better idea about filters and how they flow.