Originally this referred to a defence against prosecution as eg. the trial of Socrates.
Paul used the term apologia in his trial defence before the two kings Festus and Agrippa. Acts 26:2
In recent centuries it has become almost exclusively the province of theologians and others defending articles of faith or doctrines, or sets of doctrine, by arguing from , and elucidating scripture. Although it is not an exclusively Christian usage, it is commonly applied in Christian religious debate; particularly when that takes place over a long time and is in defence of Christian doctrine. The current long time debate between proponents of Creationism and Dawinian Evolution as to the origins of life on Earth, and geological time spans is a good example.
Interestingly; the term ‘apology’ is an example of meaning turned on its head. An apology is given when one is guilty. Apologetics on the other hand, is closely in tune with original Greek meaning of apologia, which is a position of defence against ideas which contradict a position; especially as a defence against prosecution.