A deadline is a time by which some task must be completed.
Very often, it means a time limit that is set in place by an authority - for example, a teacher tells students that they must turn in their homework in by a certain time. This is so the teacher is able to report fairly to his or her principal that every student had the same chance to do the work.
Deadlines may also be set by a time horizon that comes from something that is not a human authority, but part of nature. For example, by sunset one must do those tasks requiring daylight. However, a human must watch the sun and decide what light is strong enough to still be daylight, so time limits will still be involved even if one observes a horizon and sets a deadline oneself.
A way to remember this is that a time horizon is like the physical horizon where sunset happens and a time limit is a thing people set up to deal with this. A deadline is a thing powerful people set up to ensure less powerful people comply with their way of doing things.