The fish opened its mouth and the floor lowers, this decreases the pressure in the mouth due to increased volume and water flows in. The fish closes its mouth and the floor is raised, the decreased volume increases the pressure and water is forced out over the gills.