Then the LORD said to Moses, "Tell Aaron, ‘Stretch out your shepherd's rod and hit the land's dirt so that lice appear in the whole land of Egypt.'"
References for Exodus 8:16
They did this. Aaron stretched out his hand with his shepherd's rod, hit the land's dirt, and lice appeared on both people and animals. All the land's dirt turned into lice throughout the whole land of Egypt.
The religious experts tried to produce lice by their secret knowledge, but they weren't able to do it. There were lice on people and animals.
References for Exodus 8:18
The religious experts said to Pharaoh, "This is something only God could do!" But Pharaoh was stubborn, and he wouldn't listen to them, just as the LORD had said.