fish swim by exerting force against the surrounding water. there are exceptions, but this is usually done by the fish contracting muscles on either side of its body. this starts waves of flexion which travel the length of the body from nose to tail, generally getting larger as they go along.