Bottom brackets are the interface between the bike frame and the crankset. Since neither is really standardized, neither are bottom brackets.
Where it meets the frame the width, diameter and thread pitch have to match. Almost (but not quite) all bike bottom bracket shells are either 68mm or 73mm wide and English threaded.
Where it meets the crankset the spindle length and crank interface have to match. Spindle length is easily measured. The interface is going to be square taper, hollowtech, octalink, Isis, etc. There's lots of different ones.