If you put something in water that has a higher density than water it will sink. If that thing with everything in it has a lower density than water, it will float. What material that thing is made of is irrelevant.
A ordinary boat is mainly filled with air, which is a lot less dense than water, so even if the boat is made of lead, it will float. If you replace the air in the boat with water, it will sink.
At the bottom of seas and oceans lay a lot of wooden shipwrecks. By itself, that wood might float, but because it is part of a ship with a higher density than water, it sunk anyway.
The same thing goes for water itself. High density 'heavy' water sinks, light water floats on top. Fresh water has its highest density at roughly 4 degrees Celsius. That is why the temperature of the deepest part of a lake that is frozen over, always has that temperature. That is how fish survive the winter, in the mud on the bottom. Water has its lowest density in its solid form as ice. That's why ice floats on liquid water, like a boat.