Mostly, we realized that the wheel bearing went to bad when we heard that unmistakable "whirring" noise during driving or just turn the steering wheel. As they wear out, excess play develops in the bearing. This excess play, along with dust, dirt, and debris sneaking its way inside, will end up damaging the internal bearing surfaces. Once the wheel bearing surfaces are damaged, they have zero chance of survival. The wheel bearing's condition will worsen until it finally self destructs in spectacular fashion. As you can imagine, the ideal situation is to replace the wheel bearing long before it reaches the point of destruction.
Wheel hubs themselves rarely have issues because they are simple blocks of steel. The most common reason to replace a wheel hub is because the wheel bearing that is attached to it has failed. Wheel bearings can fail because of age, dirt and water contamination, or improper installation. Most hubs that are driven by axles require a very specific torque when installing. If that torque is too tight or too loose, the life of the wheel bearing can become shortened. That said, most wheel hub and bearing assemblies are very DIY friendly. If you can replace brakes yourself, you probably won't have any trouble replacing a wheel hub yourself either.