In the YouTube video BBC Horizon: The Secret You, the idea of when humans become aware of self is explored. Using a mirror test to asses self-awareness, it was determined that people become self aware between the ages of 18 and 24 months. The test involved putting a red spot on the face of a toddler, placing them in front of a mirror, and observing whether or not they removed the spot after seeing their reflection. The thought behind this is that if the child realized that the person in the mirror was himself, he would remove the spot from his face. Likewise, if he did not connect the person in the mirror with himself, he would leave the spot on his face.
This is a classic test that has been used numerous times to analyze self awareness in humans and even animals. However, there is a risk that rival hypotheses have not been ruled out. Perhaps the reason that children under the age of 18 months usually leave the spot on their face is not because they aren't self aware, but because they don't realize that the spot is out of the ordinary and should be removed. To test this, a study was performed in which children were asked to remove a spot on a doll's face before being exposed to their own marked face in the mirror. Indeed, in the original test only 45% of 18-month olds were regarded as "recognizers," but in the revised test it rose to 61%.
Asendorph, Jens B. "Self-Awareness and Other-Awareness II: Mirror Self-Recognition, Social Contingency Awareness, and Synchronic Imitation." Developmental Psychology 32.2 (1996): 313-21.