Typically, they have to rely on a little grease added at the factory, maybe many years ago. When they run dry or start to rust, they will heat up, wear out of round and develop excess clearance. Most bad bearings aren't immediately obvious, though they will get worse quickly if you ignore the first signs. Or you can feel a grittiness in the bearings when you turn them by hand when the wheel is off for a tire change. Usually bad bearings will not turn as easily as good ones and will feel 'lumpy' as you turn them, instead of turning smoothly.
Most bikes use sealed caged ball bearings.
The inner and outer races are replaced along with the balls as a unit, and the entire bearing unit is pressed into the hub. Some bikes, most notably BMWs, use tapered roller bearings. These may or may not be replaced as a unit, and often need a fairly specific amount of preload built in when they are fitted into the wheel. Since they're more complex and rarer, we'll ignore the tapered roller bearings and cover the more common caged ball bearings. Ball wheel bearings are usually a press-fit into the hub with a slight interference fit between the hub and the outer race.