Modern BB shells are threaded to either English (35mm=1.375" diameter, 24TPI, self-tightening LH thread on the drive side) or Italian (36mm diameter, 24TPI, RH thread on both sides) standard, for which both conventional and sealed/cartridge BBs are readily available. To replace anything in the bottom bracket, you need to know your thread type (English for almost all non-Italian bikes), your spindle length, your BB shell width (68mm with most standard frame tubes, 73mm for many aluminum and other oversize frames, 70mm for Italian steel frames), and, for conventional BBs, your bearing cup thickness ("thick" or "thin") and spacing between bearing surfaces on the spindle. I have successfully (and extremely easily) converted two mountain bikes to cartridge BB bearings. The Specialized HardRock has a 68mm wide, English-threaded BB shell, whereas the aluminum-framed Ross Rock Machine has a 73mm-wide, English-threaded BB shell. Both took standard Shimano UN-72 cartridges, but with different spindle lengths.
The additional trick is to match the size of the spindle taper to that of the cranks, to ensure that the cranks seat properly. Although the taper angle is standardized, Shimano and Campy tapers end at slightly different widths, such that cranks often sit too far outward or inward on "foreign" spindles.