Is this a NEW boat or an older boat? A new boat might have fiberglass odors, an older boat probably smells from mildew and molds, and the only way to cure that is an intensive sterilization and cleaning program from stem to stern, followed by sealing any porous surfaces (like unpainted plywood). Only after you've gotten the boat cleaned out and the problem removed, can you control the odor with "ordinary" steps, which usually mean keeping it well ventilated and reasonably dry. That means open ventilation at *all* times, or better yet a couple of solar vent fans that ensure airflow all the time.
Chasing down mold and mildew is really a DIY "biohazard decontamination" project, but it you really attack it and get rid of it, it is much easier to prevent it from coming back. Attack it halfway--and it will always win.