Reproduction involved the male passing his sperm to the female. Sometimes he passed her a packet containing sperm. Often he injected the sperm into her body. The female used the sperm to fertilize the eggs while they were still in her body. Then she covered the eggs with a hard protective coating and laid them near to some food.
Insect eggs are therefore similar to the seeds of plants.
When the young hatched they were able to live on land. So the insects were completely free from the need for surface water to reproduce. These animals appeared about 300 million years ago.