Through self awareness. Our perception of the outer world is based on our thought process. Most people do not pay attention to the constant dialogue the mind is having with itself. It is important to pay attention because our experience of the outer world is directly linked to that inner dialogue. It is a random bunch of voices of everything everybody has ever said to us or thoughts we have had about ourselves and most of it is negative. The ego dwells on the negative. So it colours much of our experience in a negative light.
By paying attention to our thoughts and the effects or co-incidences that they cause, we become aware how those thoughts for the basis of our reality. The trick here is to alter the dialogue to one that is more positive. This can take practice but if we are diligent we can change our experience to one that is more positive.
We create our own reality. But most people are not aware of this so much of what they experience seems like random chance. They create their reality by default using ideas and beliefs that are not their own. They are those of all those who influenced them in their lives. If they would pay attention to that inner dialogue they would recognize the voices of those who planted those ideas and beliefs. They would no longer have to be influenced by all the negative thoughts because they can change them.