All of us have core beliefs. Core beliefs are developed early in life, from our interactions with significant others and shape our world view - how we view ourselves in relation to the world, and the people that we interact with. Core beliefs can be positive and negative, and we have a number on both sides. Positive ones include: "I'm a good friend", "I'm a hard worker" etc. Negative ones include: "I'm not good enough", "I am unloveable". They are largely unconscious beliefs that we have, but get triggered in certain situations. For example, if you have a core belief that you are not good enough, then this belief will likely be triggered in situations where you "fail" or are likely to experience difficulty. Once the core belief gets activated, then you are likely to experience symptoms of depression or anxiety.
The other part of core beliefs is how we try to mitigate them - we set up rules that try to prevent the core belief from being activated. Using the 'not good enough' example again, a rule might be "I need to be the best". So long as this is being achieved, the core belief doesn't get activated, and the feelings of depression or anxiety are kept at bay. But there is a cost - being the best is difficult to achieve, or achieve on a consistent basis. And what constitutes "the best"? This is just one example of how to cope with this type of core belief. There can be a multitude of examples.
The thing is - these core beliefs were often developed a long, long time ago. They are often irrelevant in the present (the negative ones, the ones that cause us pain). Yet, they often drive a lot of our behaviours. And they are hard to get rid of. Because they are unconscious and ingrained in our belief system, we just accept them as truths, without even questioning their validity. And the way to overcome them has to come from within - we are incredibly good at discounting information that would disprove the core belief. A friend telling you "you are good enough" won't be enough to break-down the core belief.
It is possible to overcome and change these old thinking patterns. The first step is to recognise the old 'scripts' that we keep telling ourselves and then to actively challenge and seek disconfirming evidence.