In order for an object to float, it must have less overall density than water and must weigh less than the amount of water displaced. A penny, for example, is usually made of copper. copper has a density of about 8.94g/cm3. water has a density of 1g/cm3. So a penny is heavier than water. pennies also weigh much more than the water they displace, which is a tiny amount. which is why they sink, and rather quickly.
Boats, although made of metal, are (as mentioned by other forum members) less dense because they contain a lot of air. boats, especially bigger ones, cover a larger area and thus spreads out their weight and lowers their density even more. also, boats displace less water than you'd think. When you see a ship in a dry dock, that red/blue/white area at the bottom indicates the portion of the ship under water and thus the water that is displaced. If you look at a picture of just about any large ship, that portion is relatively small in comparison to the rest of the ship
I think I got those points correct, but correct me if I'm wrong. I'm not an expert