( الْيَمِّ ) (the sea): The were drowned in the deep sea.
( بِأَنَّهُمْ كَذَّبُوا بِآيَاتِنَا وَكَانُوا عَنْهَا غَافِلِينَ ) (because they denied Our signs and were heedless of them): They denied all these signs which they paid them no heed. They failed to realize that the signs were warnings from Allah (swt) and as a result, Allah (swt) drowned them.
Some other Surahs in the Holy Quran narrate the story of Prophet Moses (PBUH) and the Children of Israel when they reached the sea while Pharao and his people were chasing them. At that moment, the Children of Israel said to Prophet Moses (PBUH): ‘We are to be overtaken’ because the sea was is in front of them, and Pharao is behind them. But Prophet Moses (PBUH) responded with full confidence, faith, determination, and strength, even while facing the sea and the approaching enemy:
قَالَ كَلَّا ۖ إِنَّ مَعِيَ رَبِّي سَيَهْدِينِ
([Moses] said, “No! Indeed, with me is my Lord; He will guide me.”) (Ash-Shu’araa: 62)
Thus, he placed his trust in Allah (swt). When Allah (swt) is on a person’s side, no one can defeat him. For this reason, as Prophet Muhammad (saws) was in the cave, surrounded by the pagans, and Abu Bakr (may Allah be pleased with him) said:
“O Allah’s Messenger (ﷺ) If one of them (pagans) should lift up his foot, he will see us.” He said, “What do you think of two, the third of whom is Allah?”[1]
This scene is mentioned in the Holy Quran:
إِذْ يَقُولُ لِصَاحِبِهِ لَا تَحْزَنْ إِنَّ اللَّهَ
(and he said to his companion, “Do not grieve; indeed Allah is with us.”) (At-Tawba: 40)
Here, while Prophet Moses (PBUH) was facing one of the difficult and most challenging moments in his prophetic history, he uttered just one word: (“No! Indeed, with me is my Lord; He will guide me), meaning: (Allah (swt) will rescue me). And indeed:
( 63 ) فَأَوْحَيْنَا إِلَىٰ مُوسَىٰ أَنِ اضْرِب بِّعَصَاكَ الْبَحْرَ ۖ فَانفَلَقَ فَكَانَ كُلُّ فِرْقٍ كَالطَّوْدِ الْعَظِيمِ ( 64 ) وَأَزْلَفْنَا ثَمَّ الْآخَرِينَ ( 65 ) وَأَنجَيْنَا مُوسَىٰ وَمَن مَّعَهُ أَجْمَعِينَ ( 66 ) ثُمَّ أَغْرَقْنَا الْآخَرِينَ
(( 63 ) Then We inspired to Moses, “Strike with your staff the sea,” and it parted, and each portion was like a great towering mountain. ( 64 ) And We advanced thereto the pursuers. ( 65 ) And We saved Moses and those with him, all together. ( 66 ) Then We drowned the others.) (Ash-Shu’araa)
In this Surah of the discussion, Allah (swt) reveals only the result:
( فَانتَقَمْنَا مِنْهُمْ فَأَغْرَقْنَاهُمْ فِي الْيَمِّ ) (So We took retribution from them, and We drowned them in the sea), He (swt) does not explain the event in detail.
[1] Sahih Al-Bukhari, the Book of Tafseer, no. 4386.