The cargo module was an independent cargo container which was attached to a spacecraft at hardpoints. If the load in a module was not balanced, a vibration would result. One possible solution to the vibraton was to trim the load.
Cargo modules were a familiar sight on 22nd century Earth Cargo Service freighters. These freighters could carry eight cargo modules, like the Y-class ECS Fortunate, or carry ten cargo modules, like the J-class ECS Horizon. (ENT: "Fortunate Son", "Horizon")
In August of 2151, the crew of the Fortunate used cargo module 4 as a zero gravity area to play football. Later, they used the same module as place to held their prisoner, a Nausicaan. When an away team of Enterprise NX-01 learned the truth about the prisoner, they were locked in cargo module 8 which was jettisoned by Matthew Ryan. (ENT: "Fortunate Son")