Both.
Swimming means to self-propel through (typically) water either on the surface or beneath it.
Floating means to be buoyant, either on the surface with positive buoyancy or in the middle of it with a neutral buoyancy.
So fish can swim in water and also float in water.














No, but if it did, it would still be swimming :)
I was definitely being pedantic but a lot of it is defensive pedantry learned from too many years of being online where if you don’t close a hole someone will jump on you for it.