Then the LORD spoke to Moses. He said, "Tell Aaron, 'Reach your wooden staff out. Strike the dust on the ground with it.' Then all over the land of Egypt the dust will turn into gnats."
References for Exodus 8:16
So they did it. Aaron reached out the staff that was in his hand. He struck the dust on the ground with it. The dust all over the land of Egypt turned into gnats. They landed on people and animals alike.
The magicians tried to produce gnats by doing their magic tricks. But they couldn't. The gnats stayed on people and animals alike.
The magicians said to Pharaoh, "God's powerful finger has done this." But Pharaoh's heart was stubborn. He wouldn't listen, just as the LORD had said.