Most boats will have a grounding point, near the fuse panel. It is just going to be a strip mounted, with a row of bolt terminals, likely having one larger wire going to the negative on the battery
, and smaller wires going to the variouls lights, radio
, depth sounder
If it is a computer style fan you just want to hook the red to positive, (the fuse panel) and the black to ground/negative strip.
Would be worth while to confirm the fan is 12 volt, I think most of them are.
If your fuse panel has a fuse socket that is not used you can hook to that, then install a very small fuse, (that depends on wire size and then the device current, though remember it is important to never run too small fuse and/or wire for current draw, another source of potential fire).
It is very important to not run a larger fuse size than the current the wire can handle. If the wire will handle less current than the fuse, that may lead to a fire later. VERY important to fuse for wire size, you can search wire size charts
for a better understanding of that.
If your panel does not have an unused fuse socket, then an inline fuse, of decent marine quality is neccesary, and again a fuse size to match device and wire.
Fan likely has red, and black, red to fuse panel, black to ground/negative strip. If you can't readily see the ground/negative strip, try tracing the wires from the battery
Example: If device draws max 100 milliamps (.1 amps) then a fuse larger than that, but not 10 times that. Motors that draw running current often need double or more than double current to them, during startup and stall loads. But that only becomes an issues with larger motors, not tiny fans.
Keep in mind if the fan runs 24 hours, you miltiply the running current by the time, and that equals the 24 hour draw. 100 milliamps (.1 amps) for 24 hours is 2400 milliamps (2.4 amps) 10 days, is 24 amps, etc. If the boat is to be left without charge, it is important to not put loads on the battery that will kill (discharge) it before it gets a chance to charge back up.
Sorry for being long winded hope this helps!