where to start
in the simplest term
there are 2 types ( ok 3 but well stick to 2 for now ) of headtube ( the vertical tube at the front ) 1 inch which will require inch threaded forks and 1" 1/8 that is threadless
the length of the fork isnt a great concern , nor is the rake/trail/offset
just make sure you have 20" and not 24" lol
whak kind of bmx is it ?
if its old its very likely to be a 1 inch , easy way to spot the forks you need is by the threaded part at the top , headset is 1" , itl have 2 cups that get pressed into the frame , 2 caged bearings , a crown race that gets knocked onto the fork , a threaded race for the top ( sometimes knurled ) a spacer and lastly a locknut
the stem for 1" is a "quill" or "gooseneck" distinguisable by its long shaft , any will do they all bend eventually
" 1 1/8 is easy to spot due to its lack of thread on the steerer tube ( the part of the fork that goes into the headtube ) its also longer because instead of having a shafted stem going into it , it has a clamp on stem . headsets are similar but have no threaded part . the preload is instead set by a bolt on top of the forks . either a welded part is visible when you take a glane inside the steerer or something is placed into it to tighten the lot down and it is lastly locked off with the bolts on the stem
the cranks you need are determined by what size the hole ( bottom bracket shell ) is in the frame
if its considerably large itl be "american" this is the best as its the stiffest in terms of flex while riding , and any cranks you want will fit .
if its small and threaded its "euro" or mountainbike , itl be about 68mm wide
there is also "mid" which is american sealed but withut the alloy cups needed for american ( ie a sealed bearing is fitted straight into the hole )
and " spanish " which is simlar to mid but is a different size bearing
pedals are either 1/2 which is pretty much only for one/nought piece cranks . or 9/16 which is all mountainbike/three piece
ill leave it to the next guy to fill in some gaps or you could ask about a specific area