I just had an idea that sounded kind of philosophical: That the nonstop thinking of random thoughts in your head is from the neural network in your brain. And your consciousness is separate from this so it can use the body to accomplish things. If you think about it, your body is just a community of various living cells, all dependent on each other for survival. The randomness of the thoughts could be explained by their source being cellular activity. As conscious beings, we're able to listen to these thoughts and then still decide what direction to take your body.