As stated, you should mount it at the highest point possible. However, you can attach it to a rail or use a flange mount to lock it in place on a vertical or horizontal location. Some can even be ratcheted onto a sloping surface. If you have a sailboat, the right place to mount the device would be on the mast. You should keep it away from other antennas and it should be kept a minimum of three feet from your VHF radio.
You will have to determine before you purchase whether a mounting kit is included with the purchase. If it is not, the same brand or manufacturer should have a mounting kit available for separate purchase.