Swimming in public swimming pools
You should note – may Allaah bless you – that the Muslim is commanded to protect his religious commitment and to keep away from places of fitnah (temptation). Going to these beaches is haraam because of the uncovering of ‘awrahs and careless mixing between men and women that happen there.
Moreover these places are filled with evil things, so it is not permissible for you to go there, unless you are going to enjoin what is good and forbid what is evil. The Prophet (peace and blessings of Allaah be upon him) said: “Whoever among you sees an evil action, let him change it with his hand [by taking action]; if he cannot, then with his tongue [by speaking out]; if he cannot, then with his heart [by hating it and feeling that it is wrong] – and that is the weakest of faith.”
(Narrated by Muslim, 49)
If you stay with them without enjoining what is good and forbidding what is evil, then you are partaking in sin with them. Allaah says (interpretation of the meaning):
“And it has already been revealed to you in the Book (this Qur’aan) that when you hear the Verses of Allaah being denied and mocked at, then sit not with them, until they engage in a talk other than that; (but if you stayed with them) certainly in that case you would be like them. Surely, Allaah will collect the hypocrites and disbelievers all together in Hell”
[al-Nisa’ 4:140]
This verse indicates that whoever sits in a sinful gathering and does not denounce them shares the burden of sin equally with them. He should denounce them if they engage in sinful talk or sinful actions. If he is unable to denounce them then he should get up and leave them.
(Tafseer al-Qaasimi, 5/526)
Do not let the Shaytaan deceive you and make you say that you will not pay any attention to what other people are wearing. This is the deception of the Shaytaan, because if a person goes (to such places) his gaze will inevitably fall upon something that makes his Lord angry. A man may look at something unintentionally, but the Shaytaan can use this glance to great effect and make it the means that leads to fitnah, Allaah forbid. I ask Allaah to grant us and you refuge from being led astray by fitnah, and to make us steadfast.
May Allaah send blessings upon our Prophet Muhammad and upon all his family and companions.
And Allaah knows best.