وَأَلْقِ مَا فِي يَمِينِكَ تَلْقَفْ مَا صَنَعُوا
...
We (Allah) said: "Fear not! Surely, you will have the upper hand. And throw that which is in your right hand! It will swallow up that which they have made.
Thus, Allah revealed to him at the right moment, to throw what was in his right hand, which was the stick. When he did so, it swallowed what they had made. It became a huge, monstrous creature with legs, a neck, a head and fangs. It went after these ropes and sticks until none of them remained, except that it was devoured and swallowed by this beast.
At the same time, the magicians and all of the people were watching with their own eyes, seeing this amazing event in broad daylight. Thus, the miracle was performed and the evidence was clear. The truth prevailed and the magic was proven to be falsehood.
This is why Allah said,
...
إِنَّمَا صَنَعُوا كَيْدُ سَاحِرٍ وَلاَ يُفْلِحُ السَّاحِرُ حَيْثُ أَتَى
That which they have made is only a magician's trick, and the magician will never be successful, to whatever amount (of skill) he may attain.
So when the magicians saw the event and witnessed it with their own eyes, while they were knowledgeable of the various tricks and methods in the sciences of magic, they knew with conviction that what Musa had done was not magic or illusionary tricks. They recognized that it was the truth without any doubt. They knew that no one had any power to do this except for One Who says for a thing "Be," and it is. Therefore, when this happened, they fell down into prostration to Allah.