I believe you're referring to the Mexican tradition of celebrating Christmas on the 24th, also known as Nochebuena. This tradition dates back to the pre-Colombian era, when indigenous people celebrated the winter solstice as a way to welcome the new year. The celebration was centered around the belief in the god Tezcatlipoca, who represented the night and darkness. Today, the tradition has evolved into a celebration of the birth of Jesus, but it still retains some elements of the ancient beliefs.