"The path to the Deathless is awareness,
Unawareness, the path of death.
They who are aware do not die;
They who are unaware are as dead.
--The Buddha in the Dhammapada
Mindfulness is a vast topic upon which innumerable books have been written, and countless hours spent considering. It is at the foundation of Buddhism's teachings, and was considered essential by the Buddha in order to attain Enlightenment.
To practice mindfulness, one must be aware at all times of the Six Sense Doors and the data being received by them.
Simply put, the Six Sense Doors are the five physical senses (touch, taste, smell, sight and hearing), in addition to the mental states (thoughts & emotions). To be mindful of these is to always examine carefully the input one recieves from these Six Sense Doors, and to consider them all passively, without emotional response.
As one continues the practice of mindfulness, they become more aware of the separation between sensory input, and the mind's reaction to it. That is, for example, one realizes that pain and the mind's response (i.e. STOP!) are seperate, and if one intercepts the pain feeling at the sense door, one can cause the negative emotional reaction from happening. This is a way to transcend physical pain and suffering.