There are two basic forms of homiletics. They are evangelistic (preaching the gospel to those who are not Christians) and pastoral (teaching those who have the Spirit of God in them).
An example of evangelistic preaching is the message the apostle Paul spoke on Mars Hill to pagan god worshipping Athenians (Acts 17:22 - 31). Examples of pastoral homiletics are Christ's discourses to his disciples during and after his last Passover (John 13 - 16) and the apostle Paul's all-day teaching to the disciples at Troas (Acts 20:7).
The apostle Paul was one of, if not the, most effective teacher and preacher in the New Testament. While he personally shunned messages in the style of those who wished to deceive or please others (1Thessalonians 2:2 - 3, 5), he adapted what and how he spoke (his homiletics) based on his audience.
To the pagans in Athens Paul appealed to their pursuit of knowledge in order to reveal the REAL God (Acts 17:22 - 31). To Jews he spoke from a Jewish point of view (1Corinthians 9:19 - 22). He encouraged his friend, the young evangelist Timothy, to give himself fully to those things that would make his preaching effective (1Timothy 4:12 - 15).
Augustine of Hippo (354 - 430 A.D.), a bishop in the Catholic Church, is thought to be the first person to record basic principles and rules for homiletics in his work "On Christian Doctrine."