Talking to yourself is actually a normal thing to do.
Let’s admit it, at least once in a while we all talk to ourselves. We might not be aware of it at times, but we do. There is nothing wrong with that, so don’t think you’re going crazy or anything.
If talking to yourself is bothering or troubling you or anyone else who has complained about it to you. Then you can attempt to stop it.
Try keeping the conversation in your head, listen to music, try to think more than you talk, and/or start conversations with people. Small talk with people frequently can eventually help you stop talking to yourself.
And remember that everyone talks to themselves, so you’re most likely no different than anyone else.