Answer:
A submarine uses tanks that are filled with compressed air and when it is needed the air is released and takes on water which increase the density making it sink but when the water is pushed out the sub marine density is decreased making it float