The country in which a person is normally living for the time being. If a person is not legally in a country, that period does not count as ordinary residence. It is possible to be ordinarily resident in the UK without being settled here. For example, a worker or student may be ordinarily resident in the UK.
An overstayer is someone who remains in the United Kingdom beyond the period of the leave they have been granted.