I wish that I could say that there's a "one size fits all" type of answer to that, but there isn't. The best that I can tell you is that the primary protection area comprises an allowance for along-track accuracy, which is equivalent to the assumed accuracy of the navaid - there is a broader allowance for an NDB than for a VOR, which reflects the better accuracy of the latter. This is combined with an assumption as to where the aircraft is likely to be at the end of the o/b timing. This has both a positive and negative factor based on TAS for the highest and lowest speed aircraft within the speed range for the category (or categories) allowed to use that particular o/b leg.
There is also an allowance for errors in the timing used by the pilot, plus an additional allowance for delay in recognising the end of the o/b leg and initiating the turn. There is also an allowance for an omni-directional wind during the turn. The velocity of this wind might be a "statistical value", or the standard "2h+47" in Pans Ops.
The primary area also includes protection for entry on 30 degrees either side of the o/b track. This is joined to the rest of the protection to build the primary area. There is also protection for the situation where the omni-directional wind carries the aircraft beyond the i/b track.
Surrounding this whole area is a secondary area that extends 2.5 NM laterally. Within this area, MOC reduces linearly to zero at the outer edge.
If you can get hold of Vol 1 of Pans Ops, it will probably describe it better than that. Vol 2 will certainly describe it better, but it's heavy reading for those who haven't done a Pans Ops course. In fact, it was heavy reading for me when I first started designing procedures, so it might be too technical for many folks.
I hope this helps.