It depends on the species (kind) of turtle you have. A common pet-shop turtle is the red-eared slider. They become mature enough to start having eggs at about 5 years of age when the female shell size is about 15 cm (6 inches) across. The males can fertilize eggs at about 2 or 3 years of age, however.
Only females can lay eggs. A female can lay eggs if she's old enough even if there is no male turtle around. The eggs will not be fertile and will not turn into turtles. If you want to have baby turtles you have to have at least one female and one male turtle.
To tell the difference between a male and female turtle you can look for three things but you have to wait until they are mature, or about 5 years old: the male's front claws are longer, the male's bottom shell is slightly curved in so it can climb on top of the female and stay there while having sex, and the male's cloacal opening at the bottom base of the tail is farther from the shell, and smaller. You can see all the different ways of telling the difference for almost any kind of turtle at The World Chelonian Trust.
There are many websites about turtle breeding and you can find them by going to www.google.com and typing in: breeding turtles. One good one is Happy Turtle.
making a small donation to science.ca.