How do bony fish float in water?

Bony fish have a swim bladder which inflates and deflates, helping them float or sink.