Undercoating is the sprayed application of a wax or rubber-based composite onto the entire underside of the vehicle. It's designed to create a rust-proof layer between the underside of the vehicle and the water, ice, and salt of the road. Undercoating provides a more comprehensive protective layer for your vehicle. This includes the floorboards, wheel wells, and frame.
Even if your car's underside isn't actually visible, it is still exposed to potential damage when you go out driving. Things like dirt, debris, mud, and salt are kicked up from the road and get into the nooks and crannies of your vehicle's undercarriage. So in addition to protecting against rust and corrosion, it also provides additional protection from the filth the road coughs up.