This figurative use describes vision, thoughts, or surroundings seeming to move or blur.
The words swam before his tired eyes.
The room swam when she stood up.
This figurative meaning describes something surrounded by, covered in, or containing a large amount of liquid.
Her eyes swam with tears.
The vegetables swam in a rich sauce.