They are non-electrical hardware frequently used as visual sight-indicators for surface demarcation and level measurement.
They may also be incorporated into switch mechanisms or translucent fluid-tubes as a component in monitoring or controlling liquid level.
Hollow floats filled with air are much less dense than water or other liquids, and are appropriate for some applications.
These magnetic floats have become standard equipment where strength, corrosion resistance and buoyancy are necessary.
This is because some chemicals create vapor blankets or corrosive fumes inside of tanks.