I have recently read that most of the thoughts in our head are automatically produced by our subconscious mind and that the conscious mind is there to focus on those thoughts or not.

I wanted to perform a task but then my mind started to make excuses which eventually led to anxiety and avoiding the task even though I knew I should've done the task. I think this was a subconscious reaction.

I also read that to avoid bad thoughts you can "rise above them" by meditation and so on. That however looks to me like treating the effects and not the symptoms of the problem.

My question is:

Why do I get negative thoughts at all in the first place that trick me into avoiding/not doing what I want and is it possible to get rid of them altogether ?

Philosophically It seems that my mind has life of it's own and sometimes it works with me but other times against me, it's like I've got no control over the thoughts that appear in my head. Furthermore I've read somewhere that the whole consciousness might be just a clever trick and that we're actually on an autopilot the whole time. Any thoughts about that ?