Some dogs are natural retrievers, others need to be trained.
Most dogs will run after a ball, many will come back to you with it; but you may have some difficulty getting them to give it back to you. "It's mine now!"
How can one get a dog to give up possession and return an object to you?
Get a tennis ball, and some doggy treats. Use a craft knife to cut a slit about half-way around the tennis ball, far enough that you can squeeze it and see inside.
Go out with your dog, to a field or a meadow, and show the dog a treat. Let your dog smell the treat, then put it inside the tennis ball. Give the ball to your dog. Eventually, you should be able to get the ball back.
That may take a little coaxing. Once you have the ball, squeeze it and remove the treat. Give the reward to your dog, with praise.
Follow that up by showing another treat, put it inside the tennis ball and throw the ball. Almost all dogs will chase after a ball. Dogs love to run. Most will return to you with the ball in their mouth. Some need a reason to relinquish the ball to you. Using you to get the treat out of the tennis ball gives them a reason. When they give up the ball, you give them their treat and your praise.