How to achieve mindfulness in Islam

“Whoever is mindful of Allah Almighty in his thoughts, Allah will protect him in his limbs.”