The first compressor driven AC unit was created by
Willis H. Carrier in 1902 in America to help stabilise the paper used in a printing press. As it chilled the air it also collected reduced the humidity in the air that passed through the system.
The basic principal has not changed but over time, smaller and lighter units have been developed and some have been adapted to work in caravans.
Regarding the removal of smells, some smells (but not all of them) are carried on droplets of moisture suspended in the air. As such as the moisture is trapped by an AC unit it will also capture some smells but this is not a primary function of AC units. Gaseous smells will not be trapped in an AC unit.
Some Caravan AC units may be designed with additional features, such as either having reverse phase change heating (running the AC in reverse to bring heat from outside in - Air sourced heating) or they may have electric heating elements to direct heat the inside air.
I'm not aware of any caravan unit that contains activated carbon filters, because the additional drag these filters would create to the air flow would reduce the effectiveness of the AC system.
See the manufacturer's specifications to know what features each system may have.