The ability of an object to float on water is determined by its density relative to the density of water. Density is a measure of how much mass is packed into a given volume. If an object is less dense than the fluid it is placed in, it will float. If it is more dense, it will sink.
A boat is designed to have a shape and structure that allows it to displace a large volume of water, which helps it float. The materials used to construct the boat are typically less dense than water. Additionally, boats are designed to distribute their weight over a large area, reducing the pressure exerted on the water.
On the other hand, a grain of sand is much denser than water. The individual grains of sand are typically made of materials like silica or minerals, which have a higher density than water. When a grain of sand is placed in water, it is denser than the water and does not displace enough water to generate an upward buoyant force, causing it to sink.
In summary, the ability of an object to float or sink in water depends on its density relative to the density of water, the shape of the object, and the amount of water it displaces. A boat is designed to be less dense than water and displace a large volume of water, allowing it to float, while a grain of sand is denser than water and does not displace enough water to float.