I don't exactly understand the substance of the question so im going to assume that the answer you are looking for is buoyancy. Buoyancy determines whether something sinks or floats in water. A ship has a larger buoyancy due to the shape of the hull, a nail is does not and will sink.