Two-stroke engines typically use a crankcase-compression design, resulting in the fuel/air mixture passing through the crankcase before entering the cylinder(s). This design of the engine does not include an oil sump in the crankcase.
Four-stroke engines typically have an oil sump at the bottom of the crankcase and the majority of the engine's oil is held within the crankcase. The fuel/air mixture does not pass through the crankcase in a four-stroke engine, however a small amount of exhaust gasses often enter as "blow-by" from the combustion chamber.
The crankcase often forms the lower half of the main bearing journals (with the bearing caps forming the other half), although in some engines the crankcase completely surrounds the main bearing journals.
An open-crank engine has no crankcase. This design was used in early engines and remains in use in some large diesel engines, such as used in ships.