Good question Admin.
It takes to explore your own mind to see where thought come from. Until one doesn't look within, he/she won't know where thoughts come from. We are spirits in human bodies. The moment we got into this body, we make acquaintance with this thing we call thoughts. We are all foreign to thoughts. We as spirits are beings of much attention. In our original world (the spiritual world), we used to have our attention on one item only, one item which contains everything. That what we are good at. Watching, focusing, giving love to whatever we give our attention to, whatever is presented to us.
Now because we brought that attention quality in the material world, we now focus and follow each and everything that comes to our attention. And because thoughts are not one thing but many, we are therefore faced with a difficult mind situation. " The monkey mind", an attention following each thought, an attention which jumps from one thought to another :
Advanced meditators have noticed that the more they become spiritual, the number of thoughts coming to our attention goes down. Because spiritual process also means a change in the consciousness. Your consciousness sorts of moves up in higher layers of the mind, getting closer and closer to its orgins ( the spiritual world). The more we go up, the less thoughts we come across, until we reach the origin, where there is only one item to pay attention to (the silence). Below is complexity, the many, the details. Above is simplicity, unity, singularity. In the many we always have to connect the dots, bringing those separated information together to come up with an answer. But in the unity, all information are in one, so there will be no need to cogitate or to imagine.
We just have to realize that we are foreigners in the material world where we are facing many thoughts. We should suggest ourselves and say
"Hold on! I'm no longer at home here, and since I'm going to stay here for quite a while, I need to find a way to live with this thoughts without being influenced by them", then we learn to become simple witnesses of thoughts which come in and goes out of our attention :

. We get no attached emotionally to none of those ordinary thoughts so we may freely move up to higher regions when we need to.
In the spiritual world we may be naked, we don't need cloths (thoughts) because we don't need protection. But in the material world, we need to wear cloths. It's indeed scary to live here without thinking about where we are going, doing, being...

, we need to make decisions otherwise we are screwed. You need a mind for that. So nature provided a subconscious mind around our attention to remind us or to warn us of dangers of this world. The human mind is the only precious thing which can take humans to a different path. With a proper use of thoughts thoughts, we may forge our destiny, instead of being victims of general fate which most beings in nature face.
So thoughts come from many places. From our own subconscious mind which responsible of the automatic thoughts, of the monkey mind. To use MoonBearspeaks words, this is the "autopilte mind" :

. A disk of all sorts of archived thoughts and images which get back to our attention in turn from moment to moment. In addition to those automatic thoughts, also come to us external thoughts emanated by other humans and invisible entities; We attract all those thoughts to which we are affiliated. At the end of the day we are overwhelmed with endless thoughts ( our own thought and the ones of the surrounding). But it's okay. Unless a thought is worth chasing, encouraging or elaborating, we may simply watch them all vanish by themselves.
And No, not all thoughts are negative. The world of thought is a huge network. You can see the thought world as a forum website :

why not ? Look, in this website you have different categories of forums ( Astrology, kabbalah, magic...). When you go in the astrology category for example, you see nothing but astrology. You may spend time viewing symbols which may make you angry because they look useless at first glance

. In kabbalah you only see some strange Jews tradition view of the universe which may give you headaches. But then you also have the Inspiration category in the website, in where after having spent some time, you feel really good, soul lifted. Because what you come across there gives you a new perspective of life, letters are now read like music melody :
Well, same experience with the world of thoughts. If you tune to a scientific thought network, you start attracting and receiving scientific thoughts, in the bus, in the train, at home, in dreams... If you connect to a philosophy thought network, you start receiving more philosophic thought automatically. This is how you may self educate yourself by discovering more and more from mind network alone. However if you only connect to the day to day thought network, you get nothing but shared public opinions, you will always attract your neighboring thoughts, and will continue thinking like everyone, bringing nothing new to the world :
Also not all thoughts coming from entities are bad. Because of the type of thought network someone may be connected to, that someone by attract a corresponding spiritual entity which sees good opportunity to use the person voice or fingers as a channel, in order to bring something special to humans through speech or writings.
What about our own thoughts? Thanks to free will, we may receive a thought, modify it, purify it ( create the best thought form) and send it out for other people or thought networks (egregors) to receive, Which is one great way to contribute to earth good mental health, for the benefit of all.
Love and light
A meditation is a trip to the space between the sun and earth. Where there is No days no nights, no noise, no rain, no wind, no earth force of attraction, but just peace, just light, just silence, just freedom. Would you Join me in this trip?
M. Krya