Depending on the model of water heater, in mobile homes, it either vents directly to the outside or through the roof. The difference for a mobile home when the heater vents through the roof is the presence of an air intake vent that goes through the bottom of the dwelling.
In the case of a direct vent water heater, the air for combustion comes through the vent, which runs through the roof or to an exterior wall. Exhaust gases go out through that vent as well. The benefit of using fresh air from the exterior is a reduced risk of fire coming from flammable gases circulating around the hot water heater. In some cases, the direct vent models have a dual-channel system within one pipe, meaning that both intake and exhaust happen through that pipe. In most mobile homes, though, direct vent hot water heaters take their incoming air from beneath the home.
In some mobile homes, the residents use hot water heaters that do not require ventilation. These are known as sealed combustion units. If one of these fails, the replacement should be the same type, as another type is not likely to get adequate ventilation indoors, which can create fire and air quality hazards.