I do it when I'm trying to figure something out or getting frustrated (usually from not being able to figure something out).
My whole family, my boyfriend and most of my friends know I do it. I don't usually consider it talking to myself as I do talking to inanimate objects (like my car, computer, etc.)
At first everyone is like "are you talking to yourself ...?" Now they just continue doing whatever they're doing and ignore me... unless I start screaming and cussing, then they ask what my issue is... sometimes.