The ship has to be using a satellite connection to the larger internet, although they may have an onboard server for cruise related info.
That satellite isn't cheap, and the cruise line isn't getting it for free, but they may have free wifi available but hidden in the fine print (hoping nobody makes use of it).
I'd google cruiselinename + onboard + wifi first to see if anybody has had any demonstrated success.
Also, every compartment is going to be a faraday cage, so if wifi is available it may be in only one area onboard.
Also, also, beware of somebody setting up a fake hotspot with a cruiselineish name and stealin' ur personal datas.