Typically When we are talking to our own selves at any time in the day,the Brain thinks that it's me who's speaking , how does it create illusion of speaking ?
Our brains treat 'talking to ourselves' very similarly to talking to others. There's a small amount of evidence in studies to suggest that when we talk to ourselves, it's like verbalising the speech out loud.
Before you speak out loud, the part of your brain responsible for creating speech copies that information, and moves it the appropriate verbalising areas of the brain. However, at the same time in a process called efference-copy, it also copies it to the area of the brain responsible for listening to sounds. This process overall means that our brains can distinguish sounds that come from ourselves, and sounds that come from other people.
This also partially goes to explain why people with schizophrenia have difficulty recognising their own internal voices as 'own'. It's likely that this process has gone awry in these people, meaning they're not able to recognise their internal voice as themselves.
Here's a link to some research done in Sydney on this matter.