Quoted By:
meditate. spend maybe 20 minutes a day being aware of your body and mind. every time your mind drifts, just slowly bring it back to focus. this should become a habit, and something you do even outside of meditation. it's normal to have a brain that's always thinking whether it's about the past, future another person or about something completely fictional. realise that the only significant thought is the you, here and now. it will also help you have an objective view on things, which is a good start if you're in a stressful situation (deadline, work, family problems etc).
there's no cure for a wandering mind in general, but the first step is to realise that your mind is wandering and the second is to act. hope you come out of your NPC lifestyle anon.