Things float when they are positively buoyant, or less dense than the fluid in which they are sitting. This does not mean that an object has to be lighter than the fluid, as in the case of a boat; objects just need to have a greater ratio of empty space to mass than the fluid. In order to understand floating, it is essential to understand a few different concepts, including buoyancy, density, fluids, and the Archimedes Principle.
Buoyancy, first and foremost, is a force. Just as gravity, drag, and acceleration are all forces that move you in one way or another, buoyancy too moves a body in a direction-which happens to be up.
This upward force occurs only when a few criteria are met. First, you need to be in a fluid. This can be a liquid or a gas, some medium with moving electrons, but not a solid, as the electrons are held in place.
The other requirement is that fluid has to have a measurable density. This is a fairly useless point as the only fluid with little to no density is the vacuum of space; but it is a requirement.
With these criteria met, it is now possible for things to be buoyant, but don't assume that means everything will start floating.
There are a few types of buoyancy.
1. A NEGATIVELY-buoyant item, or a body that will sink in a fluid :: Even with the buoyant force pushing the body up (which it always does), a negatively buoyant mass will have the force of gravity pull the body downward until it reaches a solid surface below it, such as the floor. Even though buoyancy lost the battle against gravity, this body still has the upward lift of the force working in its favor. If you measure the weight of the body before it is placed in the fluid, it will weigh more than it does after it has sunk to the bottom of the fluid. This is because even though the item has sunk down, buoyancy is still trying to push it upward.
2. A NEUTRALLY-buoyant item, or a body that will stay where it is placed in the vertical direction in a tank of fluid :: In this case, the buoyant force is equal to the gravitational force, so the body neither sinks nor floats. This is the ideal model for a submarine, as a neutrally buoyant item takes the least amount of force to keep it submerged in a position or to be moved in any direction in a fluid.
3. A POSITIVELY-buoyant item, or an item whose buoyant force is so great that it can push a body upward and fight the pull of gravity :: When this type of buoyancy exists, it can be said that the body is floating. If it were to be held at the bottom of the fluid and weighed, it would weigh a negative value and be constantly pushed up and away from the scale.
Density is the measure of how much mass is contained in a measured volume, or how much stuff there is in one spot. Clearly, if you have a sponge and a rock that are the same size, there will be more material in the rock, because the sponge has hundreds of holes in the same volume of space.
Density (designated by the Greek symbol rho, ρ) is mathematically defined by the division of mass (M) by volume (V), or:
ρ = M / V
One thing to remember about density is that the mass you are measuring is that of EVERYTHING inside of the volume. Thus, in the case of the sponge, you are measuring the mass of the squishy sponge material as well as the air that fills the holes of the sponge. This explains why a boat hull full of air will float, but a hull full of water will sink. If you weigh the air-filled boat hull and divide by volume, you will get a number that is significantly smaller than if you did the same with a hull full of water.
The key thing to understanding the meaning of fluids is that in the discussion of buoyancy, aerodynamics and other scientific topics, fluids refer to more than liquids. It is common to describe liquids such as water, juice, coolant, and other wet items as a fluid, and air, nitrogen, propane and other "invisible" intangible items as a gas. But since they behave the same way in scientific equations and conversations, they get lumped into the category of fluids in scientific situations. The defining characteristic of a fluid, whether it is gas or liquid, is the ability for its electrons to freely move around in a volume of that fluid. This is in contrast to a solid, whose electrons are somewhat fixed to a location in its volume. You would never see the corner of a desk move to the middle of a desk; it just can't happen.
The story goes that Archimedes, a famous Greek scientist, was given the task of determining whether the king's golden wreath, a gift to the gods, was made of real gold or some alloy. Archimedes wanted to melt the gold material into a known volume and weigh it, thus determining the density. But the king would not allow this. So Archimedes thought about this for some time, until one day while bathing, he noticed the water level increased as he entered the tub, proportionally to his volume. This meant that he could put the difficult-to-measure crown in water, and instantly know the volume of the crown by measuring the displacement of water. At this point, Archimedes leapt up from the tub and ran naked through the streets shouting "Eureka! Eureka!"
What Archimedes came up with was a relationship between the volume of a solid and the volume of a fluid, which directly relates through the density equation, to a relationship between the density of a solid and a fluid, and the mass of a solid and a fluid. He also determined that the buoyant force, the mass of an object out of the fluid minus the mass of the object in the fluid, is equal to the weight of liquid displaced by the object, or:
Mass out of fluid - Mass in fluid = Density of fluid * Volume of solid, or,
Buoyancy = ρ * V
Archimedes determined that by measuring the weight of the water increase when the wreath was submerged, he was actually measuring the buoyant force acting on the wreath. And from this, he could divide by the density of water, and find the volume of the crown.