Your mind can be programmed. In fact, you are being programmed every day, throughout your life. By your parents, your friends, by the schooling system, media, social media, and more.
Mindfulness helps to become aware of the programming. Of subconscious patterns and behaviors. Mindfulness is a way to step out of the thought bubble, the place where our thinking and emotional life happens. Mindfulness is also a programming tool, a way to alter your pattens, a way to reprogram yourself.
It is very simple. You simply talk to yourself. Silently or aloud. By saying phrases that connect you to the present, you are taken out of the thought bubble, and into the physical present. The mind becomes focused on the present, and analytical thoughts and emotions are sent to the background.
From the state of being present, with your awareness here and now, you can introduce statements that reprogram your mind. Like this script for introducing calm into your physical present.