Sea turtles swim and live in the ocean, but when it's time to have babies, they come to the sandy beach to lay their eggs. The eggs stay safe on the land until the baby turtles hatch and can go back to the water.
Another way to say this is: Sea turtles live in the sea, but they leave the water to make nests and lay their eggs on the beach.