Ash Wednesday and the observance of Lent as we know it came into existence somewhere between the fifth and eighth centuries. Ash Wednesday is now forty-six days before Easter (forty weekdays).
The tradition of fasting during Lent mirrors that of Jesus. In the Book of Common Prayer, Ash Wednesday is described as a 'Greater Fast', one of two, with Good Friday being the other.
Fasting, in Biblical times, was always associated with acts of repentance, along with 'sackcloth and ashes'. People or communities who had sinned would wear sackcloth and sprinkle themselves with ashes, as an outward sign of their repentance.
The 'ashing' of repentant Christians was formerly only for public penitents. These people would have to go to the church door on the first day of Lent, wearing penitential clothing and with bare feet. Penances were imposed, and they were then brought into the church before the Bishop, who would put ashes on their foreheads with the words "Repent, so that you may have eternal life". Out of humility and affection, friends of the penitents would join with them and also have ashes imposed. Numbers increased gradually until eventually all Christians present came forward for 'ashing'. This became the Imposition of Ashes as we know it today. Only the words have changed: "Remember that you are dust and to dust you shall return." This is rather like saying "Don't forget your place or get above your station, for that is not what God wants of you".
The ashes used on Ash Wednesday are obtained by burning the palms of the previous year (now the palm crosses).
Lent, as a time of fasting, has been kept almost since the time of the Apostles. It is an end in itself for spiritually strengthening the faithful.