Depends on the type .. there are 3x main types .. roller, ball & pin ... ball & roller ( they type found in roller skate wheels for example) are normally assembled by a combination of heat & compression ..
pin / taper ( found, sometimes, supporting long shafts turning at high speed) are again compressed together using a press or by hand depending on the manufacturing process.
occasionally you will find that the outer and inner supporting cases are merely a press fit allowing easy separation in order that the bearings may be replaced individually .. this can occur in large bearings where the casings are hard wearing and expensive or hard to remove as they have been shrunk to fit using nitrogen.