If an object is less dense than the fluid → floats. More dense → sinks.
The main difference? Liquids are hard to compress (you can't squish water into a smaller ball), while gases are easy to compress (like pumping air into a tire). fluid mechanics for dummies