Short answer: On top of the oil filter, inside the housing
Long answer: Engines have 2 bypass valves for oil that are pressure driven. The first one is for your oil pump. At a given oil pressure, it'll begin to dump oil to limit the pressure in the system. Needed because it's a positive displacement pump. At lower temperatures or higher RPM, it can provide more oil pressure than the system can handle and you can run into issues where it blows apart the oil filter. This functionality is also why I raise an eyebrow when folks start experimenting with thicker oil, as while you seen an increase in pressure, this valve effectively limits flow.
The second one is the oil filter. Some vehicles have the valve built into the filter, some don't. These trucks have it externally. The function of this valve, is to activate at a pressure differential across the oil filter to avoid crushing / destroying the filter media. Again, it'll open sooner and provide the engine with a greater portion of unfiltered oil when cold or running thicker oil. Some folks opt to delete it. With the exception of some highly custom oiling systems, I do NOT suggest that, especially on a daily. Would be a real bummer if you were to blow apart your oil filter internally and either A. tear the media rendering it useless, or B. Send the filter media through your engine causing all sorts of havoc.
Now the third piece of info: Oil filters have a diaphragm on them - a one way check valve. You can see it as a red or black rubber piece sitting underneath the flow holes on the filter. It's function is to prevent the oil from draining out of the passages on the engine, minimizing the time it takes to get lubrication to bearings, pressurize lifters, and anything else that is dependent on oil to function. Some cheap filters with poor machining might have burrs that prevent this from working properly, or use a compound that ages and loses functionality rather quickly. This is also why I don't suggest using old stock oil filters, as this piece and dry out and be compromised. With this info in mind, if our external bypass (which also functions as a check valve) were to leak, it would allow the oil to drain back into the sump, causing oil starvation in the moments between start and when the oil reaches the moving parts. In particular, I think my issue was the lifters collapsing and not inflating again because they had no oil pressure. I made a very crude oil flow diagram to help illustrate my point
View attachment 206843
As far as install goes, you remove your oil filter, remove the threaded bit, and the valve is right there. Pop it out with a pick, put the new one in, put the threaded bit back in, and install a new oil filter. It's all of a 2 minute job.