In the Catechism of the Catholic Church (Canon 919), fasting is a means of preparation to worthily receive the Holy Eucharist.
Until the pontificate of Pope Pius XII the Eucharistic fast was from midnight. Pope Pius reduced it to three hours, and after Vatican II, Pope Paul VI reduced it to one hour. The current Code of Canon Law states,
One who is to receive the Most Holy Eucharist is to abstain from any food or drink, with the exception only of water and medicine, for at least the period of one hour before Holy Communion.
Posted in: Prayer and Fasting