A material will float or sink in water depending on how closely packed the small particles in that material are.
In a balloon, the air particles have space between them. So it will float.
In a solid iron ball, particles are tightly packed. So it will sink.