The homily is an important part of Holy Mass; in particular on Sundays and Holy Days of Obligation because the Church requires homilies to be preached on those occasions while at daily Masses the homily is optional. When there is a homily, the bishop, priest, or deacon who preaches is called to invite the assembly deeper into the mystery of God's Word proclaimed in our midst and to lead us toward the Liturgy of the Eucharist through which we sacramentally participate in Christ's Sacrifice - His Death and Resurrection.
The Church gives the homilist some latitude regarding the basis of his preaching. The homily is often focused on the Scripture readings of the day. However, the preacher may choose the Mass prayers or the liturgical season in general on which to preach. The homily may include doctrinal teaching, scriptural and liturgical interpretation, exhortation, moral instruction, and hopefully a bit of inspiration that all may be transformed more by God's Word and grow in holiness. As great or as poor the preacher may be, remember we are not there for the preacher, but for the Lord Himself Who speaks to us in many ways.